TensorLanes.select_finish: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_lanes.bend as TensorLanes Lines 119-125 of stelliferous@0.0.2.0/tensor_lanes.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_lanes.bend&start_line=119&end_line=125 import Base import stelliferous@0.0.2.0/math_compare.bend as Compare import stelliferous@0.0.2.0/traversal_cells.bend as Cells import stelliferous@0.0.2.0/kernel_tile.bend as Tile import stelliferous@0.0.2.0/tensor_operations.bend as Operations import stelliferous@0.0.2.0/tensor_view.bend as Views # The final 0..7 values use the existing certified binary kernels. Only the # tail makes three passes; full cells read all three inputs in one round. def select_finish(count: Nat,state: Cells.State) -> Selected: Cells.State{Selected{mask,yes,no},scratch,+position,slot,context} = state +count = count select_chosen(count,position,no, Operations.combine_kernel(~F32,~Compare.selected,count,Views.View{[Views.Axis{U32.from_nat(count),1}],position},position,yes,mask)) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit 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/math_compare.bend&name=selected https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_lanes.bend&name=Selected https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_lanes.bend&name=select_chosen https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=combine_kernel https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=Axis https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_cells.bend&name=State