Skip to main content

MIN_ELEMS

Constant MIN_ELEMS 

Source
pub const MIN_ELEMS: usize = _; // 524_288usize
Expand description

Least elements worth a dispatch.

Below this the round trip — two submissions, a queue wait, a readback — costs more than the whole pass does on the CPU, whatever the arithmetic per element is. Measured on a Radeon Pro 560 against the 8-thread CPU path, the crossover for the simplest chain (+/ w * x) is around a million elements; the threshold is set an octave below that so that a heavier chain, which crosses over sooner, is not kept off the device.