parallel_map_reduce

Function parallel_map_reduce 

Source
pub fn parallel_map_reduce<D, T, M, Red>(data: D, mapper: M, reducer: Red) -> T
where D: Send + Sync, T: Send + Clone, M: Fn(D) -> T + Sync + Send + Clone, Red: Fn(T, T) -> T + Sync + Send,
Expand description

Parallel map operation on array data with chunking

This function processes array data in parallel chunks using the provided mapper function.

§Arguments

  • data - The data to process (e.g., array view)
  • chunk_size - Size of each chunk for parallel processing
  • mapper - Function that processes a chunk and returns a result
  • reducer - Function that combines two results into one

§Returns

The final reduced result