pub fn parallel_map_reduce_indexed<R, T, M, Red>(
range: R,
chunk_size: usize,
mapper: M,
reducer: Red,
) -> TExpand description
Parallel map-reduce operation on indexed chunks
This function takes a range of indices, splits them into chunks of the specified size, processes each chunk in parallel using the mapper function, and then reduces the results using the reducer function.
§Arguments
range- The range of indices to process (e.g., 0..n)chunk_size- Size of each chunk for parallel processingmapper- Function that processes a slice of indices and returns a resultreducer- Function that combines two results into one
§Returns
The final reduced result