def candidate
stelliferous@0.0.2.0 · kernel_planning.bend:203
import stelliferous@0.0.2.0/kernel_planning.bend as KernelPlanning
import Base
import stelliferous@0.0.2.0/kernel_cost.bend as Cost
203def candidate(+depth: U32,+work: Work,+config: Cost.Configuration,+budget: Maybe<&2,Nat>,+workers: U32,+cost: Movement,best: Plan) -> Plan:
204 Cost.Configuration{mac,byte_ns,operation_ns,grain,wake} = config
205 Movement{packed,leaves,copies,span,total,minimum} = cost
206 choose((U32.is_zero(depth) || F32.is_le(grain,minimum)) && fits(budget,workspace(depth,work,cost)),
207 depth,workspace(depth,work,cost),estimate(depth,work,config,cost,workers),best)