def dot_l

bendtorch@1.3.0.0 · tensor.bend:641

import bendtorch@1.3.0.0/tensor.bend as Tensor
import Base

641# acc + the k products from x[xo] and y[yo], stepping xt and yt; rx and ry hold the first pair, already read
642def dot_l(k: Nat, +xo: U32, +xt: U32, +yo: U32, +yt: U32, rx: Array<F32> & F32, ry: Array<F32> & F32, acc: F32) -> Dot:
643  match k rx ry:
644    case 0n Tuple{x, u} Tuple{y, v}:
645      Dot{x, y, acc}
646    case 1n+p Tuple{x, +u} Tuple{y, +v}:
647      dot_l(p, (xo + xt : U32), xt, (yo + yt : U32), yt, Array.get(F32, x, (xo + xt : U32)), Array.get(F32, y, (yo + yt : U32)), (acc + (u * v : F32) : F32))

Uses (11)

Used by (1)