pub fn plan_workgroup_1d(limits: &Limits, preferred: u32) -> Workgroup1DExpand description
Auto-tune a 1-D workgroup size: the largest power of two <= preferred
that fits both max_workgroup_size_x and max_invocations_per_workgroup.
Power-of-two sizing keeps tree reductions (which halve a stride each step)
exact. A non-power-of-two preferred is rounded down to a power of
two first. The result is always >= 1.