def estimate
stelliferous@0.0.2.0 · kernel_planning.bend:184
import stelliferous@0.0.2.0/kernel_planning.bend as KernelPlanning
import Base
import stelliferous@0.0.2.0/kernel_cost.bend as Cost
184def estimate(+depth: U32,+work: Work,config: Cost.Configuration,cost: Movement,+workers: U32) -> F32:
185 Work{+positions,+inner,+rows,owners,geometry,activation} = work
186 Cost.Configuration{mac,+byte_ns,operation_ns,grain,wake} = config
187 Movement{packed,leaves,copies,+span,+total,minimum} = cost
188 +reorder = reorder_ns(work,config)
189
190 +gather = Bool.pick(F32,U32.is_zero(depth),0.0,
191 ((U32.to_f32(rows) * U32.to_f32(positions) * 4.0 + payload_float(Nat.mul(4n,capacity((rows * positions : U32))))) * byte_ns : F32))
192 (reorder + scheduled(workers,span,total) + gather : F32)