@@ -4,45 +4,48 @@ macro_rules! impl_integer_reductions {
44 where
55 Self : crate :: LanesAtMost32
66 {
7- /// Produces the sum of the lanes of the vector, with wrapping addition.
7+ /// Horizontal wrapping add. Computes the sum of the lanes of the vector, with wrapping addition.
88 #[ inline]
99 pub fn wrapping_sum( self ) -> $scalar {
1010 unsafe { crate :: intrinsics:: simd_reduce_add_ordered( self , 0 ) }
1111 }
1212
13- /// Produces the sum of the lanes of the vector, with wrapping multiplication.
13+ /// Horizontal wrapping multiply. Computes the product of the lanes of the vector, with wrapping multiplication.
1414 #[ inline]
1515 pub fn wrapping_product( self ) -> $scalar {
1616 unsafe { crate :: intrinsics:: simd_reduce_mul_ordered( self , 1 ) }
1717 }
1818
19- /// Sequentially performs bitwise "and" between the lanes of the vector.
19+ /// Horizontal bitwise "and". Computes the cumulative bitwise "and" across the lanes of
20+ /// the vector.
2021 #[ inline]
21- pub fn and_lanes ( self ) -> $scalar {
22+ pub fn horizontal_and ( self ) -> $scalar {
2223 unsafe { crate :: intrinsics:: simd_reduce_and( self ) }
2324 }
2425
25- /// Sequentially performs bitwise "or" between the lanes of the vector.
26+ /// Horizontal bitwise "or". Computes the cumulative bitwise "or" across the lanes of
27+ /// the vector.
2628 #[ inline]
27- pub fn or_lanes ( self ) -> $scalar {
29+ pub fn horizontal_or ( self ) -> $scalar {
2830 unsafe { crate :: intrinsics:: simd_reduce_or( self ) }
2931 }
3032
31- /// Sequentially performs bitwise "xor" between the lanes of the vector.
33+ /// Horizontal bitwise "xor". Computes the cumulative bitwise "xor" across the lanes of
34+ /// the vector.
3235 #[ inline]
33- pub fn xor_lanes ( self ) -> $scalar {
36+ pub fn horizontal_xor ( self ) -> $scalar {
3437 unsafe { crate :: intrinsics:: simd_reduce_xor( self ) }
3538 }
3639
37- /// Returns the maximum lane in the vector.
40+ /// Horizontal maximum. Computes the maximum lane in the vector.
3841 #[ inline]
39- pub fn max_lane ( self ) -> $scalar {
42+ pub fn horizontal_max ( self ) -> $scalar {
4043 unsafe { crate :: intrinsics:: simd_reduce_max( self ) }
4144 }
4245
43- /// Returns the minimum lane in the vector.
46+ /// Horizontal minimum. Computes the minimum lane in the vector.
4447 #[ inline]
45- pub fn min_lane ( self ) -> $scalar {
48+ pub fn horizontal_min ( self ) -> $scalar {
4649 unsafe { crate :: intrinsics:: simd_reduce_min( self ) }
4750 }
4851 }
@@ -56,7 +59,7 @@ macro_rules! impl_float_reductions {
5659 Self : crate :: LanesAtMost32
5760 {
5861
59- /// Produces the sum of the lanes of the vector.
62+ /// Horizontal add. Computes the sum of the lanes of the vector.
6063 #[ inline]
6164 pub fn sum( self ) -> $scalar {
6265 // LLVM sum is inaccurate on i586
@@ -67,7 +70,7 @@ macro_rules! impl_float_reductions {
6770 }
6871 }
6972
70- /// Produces the sum of the lanes of the vector.
73+ /// Horizontal multiply. Computes the sum of the lanes of the vector.
7174 #[ inline]
7275 pub fn product( self ) -> $scalar {
7376 // LLVM product is inaccurate on i586
@@ -78,21 +81,21 @@ macro_rules! impl_float_reductions {
7881 }
7982 }
8083
81- /// Returns the maximum lane in the vector.
84+ /// Horizontal maximum. Computes the maximum lane in the vector.
8285 ///
8386 /// Returns values based on equality, so a vector containing both `0.` and `-0.` may
8487 /// return either. This function will not return `NaN` unless all lanes are `NaN`.
8588 #[ inline]
86- pub fn max_lane ( self ) -> $scalar {
89+ pub fn horizontal_max ( self ) -> $scalar {
8790 unsafe { crate :: intrinsics:: simd_reduce_max( self ) }
8891 }
8992
90- /// Returns the minimum lane in the vector.
93+ /// Horizontal minimum. Computes the minimum lane in the vector.
9194 ///
9295 /// Returns values based on equality, so a vector containing both `0.` and `-0.` may
9396 /// return either. This function will not return `NaN` unless all lanes are `NaN`.
9497 #[ inline]
95- pub fn min_lane ( self ) -> $scalar {
98+ pub fn horizontal_min ( self ) -> $scalar {
9699 unsafe { crate :: intrinsics:: simd_reduce_min( self ) }
97100 }
98101 }
0 commit comments