Skip to main content

maybe_par_chunks

Macro maybe_par_chunks 

Source
macro_rules! maybe_par_chunks {
    ($slice:expr, $chunk_size:expr) => { ... };
}
Expand description

Parallel or sequential (immutable) chunks iterator.

Useful for deterministic parallel reductions: map each fixed-size chunk to a sequential partial sum, then combine the partials in index order. Because the chunk boundaries and combination order are fixed, the result is independent of the thread count (bit-for-bit reproducible).