Skip to main content

PARALLEL_THRESHOLD

Constant PARALLEL_THRESHOLD 

Source
pub const PARALLEL_THRESHOLD: usize = 65_536;
Expand description

Element count at or above which kernels switch from a serial loop to rayon’s parallel iteration.

Type: usize, counted in array elements. For luminosity_blend_core it is counted in pixels (H × W) rather than elements (H × W × 3).

Provisional placeholder, not a measured value. 256 × 256 = 65,536 was picked only as a plausible order of magnitude for rayon’s dispatch overhead to be amortized. Run cargo bench and replace it with the crossover point benches/blend_bench.rs actually measures on the target hardware.