def rounds_with

stelliferous@0.0.2.0 · traversal_lanes.bend:73

import stelliferous@0.0.2.0/traversal_lanes.bend as TraversalLanes
import Base
import stelliferous@0.0.2.0/kernel_tile.bend as Tile
import stelliferous@0.0.2.0/traversal_cells.bend as Cells

73# One eight-value loop for any owned input bundle; gather and scatter decide
74# which owners are read or updated. The unary path is its Array specialization.
75def rounds_with(~Owner: Type,~Context: Data,~gather: Owner -> U32 -> Context -> Owner & Tile.Tile8,
76  ~scatter: Owner -> U32 -> Tile.Tile8 -> Owner,~finish: Nat -> Cells.State<Owner,Tile.Tile8,Context> -> Owner,
77  count: Nat,state: Cells.State<Owner,Tile.Tile8,Context>) -> Owner:
78  match count:
79    case 1n+1n+1n+1n+1n+1n+1n+1n+rest:
80      rounds_with(~Owner,~Context,~gather,~scatter,~finish,rest,Cells.step(~Owner,~Tile.Tile8,~Context,~gather,~scatter,~8,state))
81    case few: finish(few,state)

Uses (6)

Used by (4)