Skip to main content

should_parallelize

Function should_parallelize 

Source
pub fn should_parallelize(work: usize) -> bool
Expand description

Should an op over work elements run in parallel? True only with >1 worker and enough work to keep them busy past the amortization floor. Use this at every data-parallel kernel call site instead of a hand-picked threshold.