3 ms·
Rust allows multiple mutable non-overlapping slices. They cannot be constructed by direct array[i..j] slicing, but there is a variety of convenience functions f
by dbaupp 7y ago
Rust allows multiple mutable non-overlapping slices. They cannot be constructed by direct array[i..j] slicing, but there is a variety of convenience functions for it.
Sequential: https://doc.rust-lang.org/std/primitive.slice.html#method.split_at_mut https://doc.rust-lang.org/std/primitive.slice.html#method.sp... https://doc.rust-lang.org/std/primitive.slice.html#method.split_at_mut https://doc.rust-lang.org/std/primitive.slice.html#method.sp...
Parallel: https://docs.rs/rayon/1.2.0/rayon/slice/trait.ParallelSliceMut.html#method.par_chunks_mut https://docs.rs/rayon/1.2.0/rayon/slice/trait.ParallelSliceM...