KernelPlanning.input_transfer: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/kernel_planning.bend as KernelPlanning Lines 81-88 of stelliferous@0.0.2.0/kernel_planning.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&start_line=81&end_line=88 import Base import stelliferous@0.0.2.0/kernel_window.bend as KernelWindow # copied initializes the new owner and copies every logical band value. # Array.clone instead copies the complete allocation, without initialization. def input_transfer(copy: Bool,band: KernelWindow.Band,window: InputRows,channels: U32,width: U32) -> Nat: match copy band: case False{} band: clone_bytes(window) case True{} KernelWindow.Band{first,rows}: +count = (channels * rows * width : U32) Nat.mul(4n,Nat.add(U32.to_nat(count),capacity(count))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add 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.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_planning.bend&name=InputRows https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=capacity https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_planning.bend&name=clone_bytes https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/kernel_window.bend&name=Band