mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Use reduce_sum in as_simd example
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user