Skip to main content

det_sum

Function det_sum 

Source
fn det_sum<T>(n: usize, f: impl Fn(usize) -> T + Sync) -> T
where T: Copy + Send + Sync + Add<Output = T> + Default,
Expand description

A sum over 0..n in fixed chunks, so the result does not depend on the thread count