pub fn tree_width(
exec: &Exec<'_>,
class: KernelClass,
elements: usize,
) -> NonZeroUsizeExpand description
Width of a tree entry (parallel_map_reduce): the width in 1..=budget
that minimises ceil(log2 k) * D(k) + estimate / k among the widths at which
ceil(log2 k) sections pay, 1 when none does.
ยงExamples
use strided_basic::execution::{tree_width, KernelClass};
use strided_basic::Exec;
assert_eq!(tree_width(&Exec::serial(), KernelClass::Reduce, usize::MAX >> 8).get(), 1);