parallel_scan

Function parallel_scan 

Source
pub fn parallel_scan<T, F>(items: &[T], init: T, op: F) -> Vec<T>
where T: Clone + Send + Sync, F: Fn(&T, &T) -> T + Sync,
Expand description

Parallel scan (prefix sum) operation

Computes cumulative operation (like cumulative sum) in parallel. Returns a vector where each element is the result of applying the operation to all preceding elements including itself.