Skip to main content

chunks_mut

Function chunks_mut 

Source
pub fn chunks_mut<T, F>(data: &mut [T], chunk_len: usize, min_len: usize, f: F)
where T: Send, F: Fn(usize, &mut [T]) + Send + Sync,
Expand description

Run f(chunk_index, &mut chunk) over data split into runs of chunk_len, the shape rayon spells par_chunks_mut(chunk_len).

A trailing partial chunk is delivered short, exactly as par_chunks_mut does.