def select_finish

stelliferous@0.0.2.0 · tensor_lanes.bend:119

import stelliferous@0.0.2.0/tensor_lanes.bend as TensorLanes
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

119# The final 0..7 values use the existing certified binary kernels. Only the
120# tail makes three passes; full cells read all three inputs in one round.
121def select_finish(count: Nat,state: Cells.State<Selected,Tile.Tile8,Unit>) -> Selected:
122  Cells.State{Selected{mask,yes,no},scratch,+position,slot,context} = state
123  +count = count
124  select_chosen(count,position,no,
125    Operations.combine_kernel(~F32,~Compare.selected,count,Views.View{[Views.Axis{U32.from_nat(count),1}],position},position,yes,mask))

Uses (13)

Used by (1)