def count_rows
bend-ml-tensor-array@0.1.19.0 · main.bend:519
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArray
import Base
519def count_rows(labels: List<&2, Nat>, +mm1: Nat, +mu: U32, +i: U32, r: CR) -> CR:
520 match labels r:
521 case Nil{} CR{c, n}:
522 CR{c, n}
523 case Con{+y, t} CR{c, n}:
524 count_rows(t, mm1, mu, (i + 1 : U32), count_rows3(y, n, read_l(mm1, ((i * mu : U32) + U32.from_nat(mm1) : U32), Nil{}, Array.get(F32, c, ((i * mu : U32) + U32.from_nat(mm1) : U32)))))