geodesy icon indicating copy to clipboard operation
geodesy copied to clipboard

Reduce parallel processing boilerplate

Open busstoptaktik opened this issue 3 years ago • 0 comments

Model parallel processing after this example from the Rayon docs

// https://docs.rs/rayon/1.1.0/rayon/slice/trait.ParallelSliceMut.html
use rayon::prelude::*;
let mut array = [1, 2, 3, 4, 5];
array.par_chunks_mut(2)
     .for_each(|slice| slice.reverse());
assert_eq!(array, [2, 1, 4, 3, 5]);

busstoptaktik avatar Oct 05 '21 08:10 busstoptaktik