def dq_rows

bendtorch@1.3.0.0 · dtype.bend:426

import bendtorch@1.3.0.0/dtype.bend as Dtype
import Base

426def dq_rows(k: Nat, +c: Nat, +cu: U32, +i: U32, ss: List<&2, F32>, r: UF) -> List<&2, F32>:
427  match k ss r:
428    case 0n _ UF{q, acc}:
429      List.reverse(&2, F32, acc)
430    case 1n+p Nil{} UF{q, acc}:
431      List.reverse(&2, F32, acc)
432    case 1n+p Con{+s, st} UF{q, acc}:
433      dq_rows(p, c, cu, (i + 1 : U32), st, dq_row(c, (i * cu : U32), s, acc, Array.get(U32, q, U32.shrn((i * cu : U32), 2n))))

Uses (11)

Used by (1)