Skip to content

Commit 01d78aa

Browse files
committed
Update docs
1 parent e127586 commit 01d78aa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

crates/core_simd/src/reduction.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ macro_rules! impl_integer_reductions {
44
where
55
Self: crate::LanesAtMost32
66
{
7-
/// Horizontal wrapping add. Computes the sum of the lanes of the vector, with wrapping addition.
7+
/// Horizontal wrapping add. Returns 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-
/// Horizontal wrapping multiply. Computes the product of the lanes of the vector, with wrapping multiplication.
13+
/// Horizontal wrapping multiply. Returns 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-
/// Horizontal bitwise "and". Computes the cumulative bitwise "and" across the lanes of
19+
/// Horizontal bitwise "and". Returns the cumulative bitwise "and" across the lanes of
2020
/// the vector.
2121
#[inline]
2222
pub fn horizontal_and(self) -> $scalar {
2323
unsafe { crate::intrinsics::simd_reduce_and(self) }
2424
}
2525

26-
/// Horizontal bitwise "or". Computes the cumulative bitwise "or" across the lanes of
26+
/// Horizontal bitwise "or". Returns the cumulative bitwise "or" across the lanes of
2727
/// the vector.
2828
#[inline]
2929
pub fn horizontal_or(self) -> $scalar {
3030
unsafe { crate::intrinsics::simd_reduce_or(self) }
3131
}
3232

33-
/// Horizontal bitwise "xor". Computes the cumulative bitwise "xor" across the lanes of
33+
/// Horizontal bitwise "xor". Returns the cumulative bitwise "xor" across the lanes of
3434
/// the vector.
3535
#[inline]
3636
pub fn horizontal_xor(self) -> $scalar {
3737
unsafe { crate::intrinsics::simd_reduce_xor(self) }
3838
}
3939

40-
/// Horizontal maximum. Computes the maximum lane in the vector.
40+
/// Horizontal maximum. Returns the maximum lane in the vector.
4141
#[inline]
4242
pub fn horizontal_max(self) -> $scalar {
4343
unsafe { crate::intrinsics::simd_reduce_max(self) }
4444
}
4545

46-
/// Horizontal minimum. Computes the minimum lane in the vector.
46+
/// Horizontal minimum. Returns the minimum lane in the vector.
4747
#[inline]
4848
pub fn horizontal_min(self) -> $scalar {
4949
unsafe { crate::intrinsics::simd_reduce_min(self) }
@@ -59,7 +59,7 @@ macro_rules! impl_float_reductions {
5959
Self: crate::LanesAtMost32
6060
{
6161

62-
/// Horizontal add. Computes the sum of the lanes of the vector.
62+
/// Horizontal add. Returns the sum of the lanes of the vector.
6363
#[inline]
6464
pub fn sum(self) -> $scalar {
6565
// LLVM sum is inaccurate on i586
@@ -70,7 +70,7 @@ macro_rules! impl_float_reductions {
7070
}
7171
}
7272

73-
/// Horizontal multiply. Computes the sum of the lanes of the vector.
73+
/// Horizontal multiply. Returns the product of the lanes of the vector.
7474
#[inline]
7575
pub fn product(self) -> $scalar {
7676
// LLVM product is inaccurate on i586
@@ -81,7 +81,7 @@ macro_rules! impl_float_reductions {
8181
}
8282
}
8383

84-
/// Horizontal maximum. Computes the maximum lane in the vector.
84+
/// Horizontal maximum. Returns the maximum lane in the vector.
8585
///
8686
/// Returns values based on equality, so a vector containing both `0.` and `-0.` may
8787
/// return either. This function will not return `NaN` unless all lanes are `NaN`.
@@ -90,7 +90,7 @@ macro_rules! impl_float_reductions {
9090
unsafe { crate::intrinsics::simd_reduce_max(self) }
9191
}
9292

93-
/// Horizontal minimum. Computes the minimum lane in the vector.
93+
/// Horizontal minimum. Returns the minimum lane in the vector.
9494
///
9595
/// Returns values based on equality, so a vector containing both `0.` and `-0.` may
9696
/// return either. This function will not return `NaN` unless all lanes are `NaN`.

0 commit comments

Comments
 (0)