Skip to main content

map_mut

Function map_mut 

Source
pub fn map_mut<T: Send, R: Send>(
    items: &mut [T],
    f: impl Fn(&mut T) -> R + Sync,
) -> Vec<R>
Expand description

items.iter_mut().map(f).collect() for disjoint parts of one buffer (for example bands of rows of an image). Each thread takes a run of neighbouring items (native).