def add_fwd

bendtorch@1.3.0.0 · spec.bend:115

import bendtorch@1.3.0.0/spec.bend as Spec
import Base
import bendtorch@1.3.0.0/main.bend as T

115# a + b for a pair of vectors; the backward pass hands dy to both (T.Add2 over vectors)
116def add_fwd(+p: Unit, x: T.Two<List<&2, Nat>, List<&2, Nat>>) -> T.Fwd<Unit, List<&2, Nat>, Unit>:
117  match x:
118    case T.Two{a, b}:
119      T.Fwd{p, vadd(a, b), Unit{}}

Uses (6)

Used by (1)