This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ macro_rules! impl_integer_reductions {
6
6
{
7
7
/// Horizontal wrapping add. Returns the sum of the lanes of the vector, with wrapping addition.
8
8
#[ inline]
9
- pub fn horizontal_wrapping_sum ( self ) -> $scalar {
9
+ pub fn horizontal_sum ( self ) -> $scalar {
10
10
unsafe { crate :: intrinsics:: simd_reduce_add_ordered( self , 0 ) }
11
11
}
12
12
13
13
/// Horizontal wrapping multiply. Returns the product of the lanes of the vector, with wrapping multiplication.
14
14
#[ inline]
15
- pub fn horizontal_wrapping_product ( self ) -> $scalar {
15
+ pub fn horizontal_product ( self ) -> $scalar {
16
16
unsafe { crate :: intrinsics:: simd_reduce_mul_ordered( self , 1 ) }
17
17
}
18
18
Original file line number Diff line number Diff line change @@ -140,20 +140,20 @@ macro_rules! impl_binary_checked_op_test {
140
140
macro_rules! impl_common_integer_tests {
141
141
{ $vector: ident, $scalar: ident } => {
142
142
test_helpers:: test_lanes! {
143
- fn horizontal_wrapping_sum <const LANES : usize >( ) {
143
+ fn horizontal_sum <const LANES : usize >( ) {
144
144
test_helpers:: test_1( & |x| {
145
145
test_helpers:: prop_assert_biteq! (
146
- $vector:: <LANES >:: from_array( x) . horizontal_wrapping_sum ( ) ,
146
+ $vector:: <LANES >:: from_array( x) . horizontal_sum ( ) ,
147
147
x. iter( ) . copied( ) . fold( 0 as $scalar, $scalar:: wrapping_add) ,
148
148
) ;
149
149
Ok ( ( ) )
150
150
} ) ;
151
151
}
152
152
153
- fn horizontal_wrapping_product <const LANES : usize >( ) {
153
+ fn horizontal_product <const LANES : usize >( ) {
154
154
test_helpers:: test_1( & |x| {
155
155
test_helpers:: prop_assert_biteq! (
156
- $vector:: <LANES >:: from_array( x) . horizontal_wrapping_product ( ) ,
156
+ $vector:: <LANES >:: from_array( x) . horizontal_product ( ) ,
157
157
x. iter( ) . copied( ) . fold( 1 as $scalar, $scalar:: wrapping_mul) ,
158
158
) ;
159
159
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments