From 2b1f249ecf4a3b52bdac520a641c502be5048f8a Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 12 Mar 2022 16:43:38 -0800 Subject: [PATCH] Use reduce_sum in as_simd example --- library/core/src/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 32d8988f149..c0eb000e877 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3536,7 +3536,7 @@ pub unsafe fn align_to_mut(&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 = (1..101).map(|x| x as _).collect();