pub fn summed<T: Copy + Send + Zero>(
n: usize,
least: usize,
sums: &mut [T],
parts: &mut Vec<T>,
piece: &(dyn Fn(Range<usize>, &mut [T]) + Sync),
)Expand description
Adds the sums of every piece of 0..n into sums, where piece(range, sums) adds the sums of the piece range into the sums it’s given. 0..n splits into one piece of at least least items for each of this thread’s threads. With too few items for two pieces, 0..n runs as one piece on this thread. Otherwise the first piece adds into sums, each later one into its own part of parts, and the parts then add into sums on this thread.