TensorIndexed.run_tiled: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_indexed.bend as TensorIndexed Lines 74-80 of stelliferous@0.0.2.0/tensor_indexed.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_indexed.bend&start_line=74&end_line=80 import Base # total positions in blocks(context) blocks of size(context) positions. The # blocks are used only when they are exactly the total and the total is # within the limit; any other count keeps the index function. def run_tiled(~Element: Data,~Context: Data,~index: Context -> U32 -> U32,~base: Context -> U32 -> U32,~blocks: Context -> U32,~size: Context -> U32, ~operation: U32 -> Element -> Element,+total: U32,+context: Context,input: Array,output: Array) -> Array & Array: run_whole(~Element,~Context,~index,~base,~operation,U32.is_le(total,block_limit()) && Nat.is_eq(Nat.mul(U32.to_nat(blocks(context)),U32.to_nat(size(context))),U32.to_nat(total)), blocks(context),size(context),total,context,input,output) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair 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_le 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/tensor_indexed.bend&name=block_limit https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_indexed.bend&name=run_whole