Skip to main content

parallel_map

Function parallel_map 

Source
pub fn parallel_map<T, U, F>(data: &[T], f: F) -> Vec<U>
where T: Sync, U: Send, F: Fn(&T) -> U + Sync + Send,
Expand description

Parallel map over a slice

When parallel features are enabled, uses rayon’s parallel iterator. Otherwise, falls back to sequential iteration.