pub fn parallel_width(
exec: &Exec<'_>,
class: KernelClass,
elements: usize,
) -> NonZeroUsizeExpand description
Width of a flat entry (one section) that exec should use for elements
elements of class: the width in 1..=budget that minimises the section
cost plus the share of the work, 1 when no width pays.
ยงExamples
use strided_basic::execution::{parallel_width, KernelClass};
use strided_basic::Exec;
assert_eq!(parallel_width(&Exec::serial(), KernelClass::Copy, usize::MAX >> 8).get(), 1);