pub fn min_task_len(len: usize, item_bytes: usize) -> usizeExpand description
Minimum items one task must hold, for a loop of the given shape.
Use this where a call site picks its own chunk length, and pass the result as that length.
§Arguments
len- total items the loop coversitem_bytes- bytes one item moves: every element read, plus every element written
§Returns
A count in 1..=max(len, 1), never zero, so it is always a usable chunk length.
Equal to the total when the loop should not split at all.
Zeroing both budget overrides pins the answer at one, which a chunked caller must expect.