pub fn batch_decision_within(
policy: &BatchPolicy,
exec: &Exec<'_>,
budget: usize,
query: &BatchQuery,
) -> BatchDecisionExpand description
batch_decision for a stage that was narrowed to budget slots (at most the
token’s own) without narrowing the token: the widths minimise over 1..=budget
with the token’s dispatch costs (Exec::width_for_within).
§Examples
use tcontract_exec::batch::{batch_decision_within, BatchPolicy, BatchQuery};
use tcontract_exec::Exec;
let d = batch_decision_within(&BatchPolicy::default(), &Exec::serial(), 4, &BatchQuery::new(8, 1e6));
assert_eq!((d.lanes, d.item_threads), (1, 1));