def rounds

stelliferous@0.0.2.0 · proofs/traversal_lanes_witness.bend:127

import stelliferous@0.0.2.0/proofs/traversal_lanes_witness.bend as TraversalLanesWitness
import Base
import stelliferous@0.0.2.0/traversal_lanes.bend as Lanes
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/proofs/storage_witness.bend as Witness

127def rounds(~Context: Data,~map: Context -> F32 -> F32,+depth: Nat,count: Nat,-state: Cells.State<Array<F32>,Tile.Tile8,Context>,evidence: Evidence<Context,depth,state>) ->
128  Witness.Witness(F32,depth,Lanes.rounds(~Context,~map,count,state)):
129  match count:
130    case 0n: finish(~Context,~map,depth,0n,state,evidence)
131    case 1n: finish(~Context,~map,depth,1n,state,evidence)
132    case 2n: finish(~Context,~map,depth,2n,state,evidence)
133    case 3n: finish(~Context,~map,depth,3n,state,evidence)
134    case 4n: finish(~Context,~map,depth,4n,state,evidence)
135    case 5n: finish(~Context,~map,depth,5n,state,evidence)
136    case 6n: finish(~Context,~map,depth,6n,state,evidence)
137    case 7n: finish(~Context,~map,depth,7n,state,evidence)
138    case 1n+1n+1n+1n+1n+1n+1n+1n+rest:
139      rounds(~Context,~map,depth,rest,Cells.step(~Array<F32>,~Tile.Tile8,~Context,~Lanes.gather(~Context,~map),~Lanes.scatter,~8,state),
140        step(~Context,~map,depth,state,evidence))

Uses (13)

Used by (1)