@@ -4,45 +4,48 @@ macro_rules! impl_integer_reductions {
4
4
where
5
5
Self : crate :: LanesAtMost32
6
6
{
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.
8
8
#[ inline]
9
9
pub fn wrapping_sum( self ) -> $scalar {
10
10
unsafe { crate :: intrinsics:: simd_reduce_add_ordered( self , 0 ) }
11
11
}
12
12
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.
14
14
#[ inline]
15
15
pub fn wrapping_product( self ) -> $scalar {
16
16
unsafe { crate :: intrinsics:: simd_reduce_mul_ordered( self , 1 ) }
17
17
}
18
18
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.
20
21
#[ inline]
21
- pub fn and_lanes ( self ) -> $scalar {
22
+ pub fn horizontal_and ( self ) -> $scalar {
22
23
unsafe { crate :: intrinsics:: simd_reduce_and( self ) }
23
24
}
24
25
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.
26
28
#[ inline]
27
- pub fn or_lanes ( self ) -> $scalar {
29
+ pub fn horizontal_or ( self ) -> $scalar {
28
30
unsafe { crate :: intrinsics:: simd_reduce_or( self ) }
29
31
}
30
32
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.
32
35
#[ inline]
33
- pub fn xor_lanes ( self ) -> $scalar {
36
+ pub fn horizontal_xor ( self ) -> $scalar {
34
37
unsafe { crate :: intrinsics:: simd_reduce_xor( self ) }
35
38
}
36
39
37
- /// Returns the maximum lane in the vector.
40
+ /// Horizontal maximum. Computes the maximum lane in the vector.
38
41
#[ inline]
39
- pub fn max_lane ( self ) -> $scalar {
42
+ pub fn horizontal_max ( self ) -> $scalar {
40
43
unsafe { crate :: intrinsics:: simd_reduce_max( self ) }
41
44
}
42
45
43
- /// Returns the minimum lane in the vector.
46
+ /// Horizontal minimum. Computes the minimum lane in the vector.
44
47
#[ inline]
45
- pub fn min_lane ( self ) -> $scalar {
48
+ pub fn horizontal_min ( self ) -> $scalar {
46
49
unsafe { crate :: intrinsics:: simd_reduce_min( self ) }
47
50
}
48
51
}
@@ -56,7 +59,7 @@ macro_rules! impl_float_reductions {
56
59
Self : crate :: LanesAtMost32
57
60
{
58
61
59
- /// Produces the sum of the lanes of the vector.
62
+ /// Horizontal add. Computes the sum of the lanes of the vector.
60
63
#[ inline]
61
64
pub fn sum( self ) -> $scalar {
62
65
// LLVM sum is inaccurate on i586
@@ -67,7 +70,7 @@ macro_rules! impl_float_reductions {
67
70
}
68
71
}
69
72
70
- /// Produces the sum of the lanes of the vector.
73
+ /// Horizontal multiply. Computes the sum of the lanes of the vector.
71
74
#[ inline]
72
75
pub fn product( self ) -> $scalar {
73
76
// LLVM product is inaccurate on i586
@@ -78,21 +81,21 @@ macro_rules! impl_float_reductions {
78
81
}
79
82
}
80
83
81
- /// Returns the maximum lane in the vector.
84
+ /// Horizontal maximum. Computes the maximum lane in the vector.
82
85
///
83
86
/// Returns values based on equality, so a vector containing both `0.` and `-0.` may
84
87
/// return either. This function will not return `NaN` unless all lanes are `NaN`.
85
88
#[ inline]
86
- pub fn max_lane ( self ) -> $scalar {
89
+ pub fn horizontal_max ( self ) -> $scalar {
87
90
unsafe { crate :: intrinsics:: simd_reduce_max( self ) }
88
91
}
89
92
90
- /// Returns the minimum lane in the vector.
93
+ /// Horizontal minimum. Computes the minimum lane in the vector.
91
94
///
92
95
/// Returns values based on equality, so a vector containing both `0.` and `-0.` may
93
96
/// return either. This function will not return `NaN` unless all lanes are `NaN`.
94
97
#[ inline]
95
- pub fn min_lane ( self ) -> $scalar {
98
+ pub fn horizontal_min ( self ) -> $scalar {
96
99
unsafe { crate :: intrinsics:: simd_reduce_min( self ) }
97
100
}
98
101
}
0 commit comments