Skip to content

Commit 2b1f249

Browse files
Use reduce_sum in as_simd example
1 parent aabaf84 commit 2b1f249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3536,7 +3536,7 @@ impl<T> [T] {
35363536
/// suffix.iter().copied().sum(),
35373537
/// ]);
35383538
/// let sums = middle.iter().copied().fold(sums, f32x4::add);
3539-
/// sums.horizontal_sum()
3539+
/// sums.reduce_sum()
35403540
/// }
35413541
///
35423542
/// let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();

0 commit comments

Comments
 (0)