def scheduled
import stelliferous@0.0.2.0/kernel_planning.bend as KernelPlanningimport Base
176# Estimate the partition on workers by (work - span) / workers + span, Graham's
177# bound for greedy list scheduling. BendRT does not steal work: it deals forked
178# tasks across rings that workers claim each turn, so this is an estimate, not
179# a guarantee. One worker gives the total work, so a split only adds its
180# copies; more workers shorten the span but pay copies.
181def scheduled(+workers: U32,+span: F32,+total: F32) -> F32:
182 ((total - span) / U32.to_f32(workers) + span : F32)