KernelBandPlanning.retained_parallel: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/kernel_band_planning.bend as KernelBandPlanning Lines 133-139 of stelliferous@0.0.2.0/kernel_band_planning.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&start_line=133&end_line=139 import Base import stelliferous@0.0.2.0/kernel_cost.bend as Cost import stelliferous@0.0.2.0/tensor_band.bend as Bands import stelliferous@0.0.2.0/tensor_band_window.bend as BandWindow def retained_parallel(window: BandWindow.Geometry,workers: U32,config: Cost.Configuration,cost: Movement) -> Bool: BandWindow.Geometry{Bands.Geometry{+batch,channels,height,width},kernel,stride,padding,oh,ow} = window Cost.Configuration{mac,byte_ns,operation_ns,grain,wake} = config Movement{+total,+span,+open,+settled,preparation,minimum,+leaves} = cost +workers = U32.max(1,U32.min(workers,858993459)) U32.is_lt(1,workers) && Nat.is_le(U32.to_nat(leaves),Nat.mul(U32.to_nat(batch),U32.to_nat((workers * 5 : U32)))) && F32.is_le(grain,total) && F32.is_lt((parallel_ns(workers,span,open,settled) + 2.0 * U32.to_f32(batch) * wake : F32),total) Uses (21): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.max https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.min https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_f32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&name=Movement https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_band_planning.bend&name=parallel_ns https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_cost.bend&name=Configuration https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Geometry https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=Geometry