Use reduce_sum in as_simd example

This commit is contained in:
Jubilee Young 2022-03-12 16:43:38 -08:00
parent aabaf8430c
commit 2b1f249ecf

View File

@ -3536,7 +3536,7 @@ pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T]) {
/// suffix.iter().copied().sum(),
/// ]);
/// let sums = middle.iter().copied().fold(sums, f32x4::add);
/// sums.horizontal_sum()
/// sums.reduce_sum()
/// }
///
/// let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();