KernelPackingWitness.pack: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend as KernelPackingWitness Lines 224-229 of stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&start_line=224&end_line=229 import Base import stelliferous@0.0.2.0/traversal_loop.bend as Loop import stelliferous@0.0.2.0/kernel_spatial_packing.bend as Packing import stelliferous@0.0.2.0/kernel_tile.bend as Tile import stelliferous@0.0.2.0/proofs/storage_witness.bend as Witness import stelliferous@0.0.2.0/proofs/traversal_witness.bend as TraversalWitness import stelliferous@0.0.2.0/proofs/kernel_packing_read_witness.bend as PackingReadWitness def pack(+depth: Nat,+count: Nat,+start: U32,-input: Array,-output: Array,+h: U32,+w: U32,+k: U32,+s: U32,+p: U32,+ow: U32,+inner: U32, +input_evidence: PackingReadWitness.family(input),balanced: Witness.Witness(Tile.Tile8,depth,output)) -> TraversalWitness.ResultEvidence,Tile.Tile8,input,depth,Packing.pack(count,start,input,output,h,w,k,s,p,ow,inner)>: +cursor = {TileCursor{0,start,h,w,k,s,p,ow,U32.to_nat((inner / (k * k) : U32)),U32.to_nat(k),U32.to_nat(inner)} : TileCursor} finish(depth,input,Loop.run(~Packing.Tiled(),~Packing.tile_step,Nat.div(count,U32.to_nat(inner)),restore_tiles(input,output,cursor)), tile_loop(depth,Nat.div(count,U32.to_nat(inner)),input,restore_tiles(input,output,cursor),input_evidence,TileEvidence{output,cursor,{==},balanced})) Uses (21): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div 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_nat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_spatial_packing.bend&name=Tiled https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_spatial_packing.bend&name=pack https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_spatial_packing.bend&name=tile_step https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_tile.bend&name=Tile8 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_read_witness.bend&name=family https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&name=TileCursor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&name=TileEvidence https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&name=finish https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&name=restore_tiles https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/kernel_packing_witness.bend&name=tile_loop https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_witness.bend&name=Witness https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/traversal_witness.bend&name=ResultEvidence https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_loop.bend&name=run