def run_from

bendtorch-core@0.1.0.0 · src/tensor/batched_matmul.bend:249

import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as BatchedMatmul
import Base
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix

249# The `fuel` terms of a cell from offsets `lp` and `rp`, from +0.0, each
250# next term `ls` and `rs` further on: `Matrix.product_run` after the first
251# reads.
252def run_from(fuel: Nat, +ls: Nat, +rs: Nat, +lp: Nat, +rp: Nat, la: Array<F32>, ra: Array<F32>) ->
253  F32 & (Array<F32> & Array<F32>):
254  match fuel:
255    case 0n:
256      (0.0, (la, ra))
257    case 1n+rest:
258      Matrix.product_run(rest, ls, rs, lp, rp, 0.0, Array.get(F32, la, U32.from_nat(lp)), Array.get(F32, ra, U32.from_nat(rp)))

Uses (8)

Used by (2)