def ew1_loop

bendtorch-gpu@1.3.0.0 · main.bend:70

import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpu
import Base

70# out[i] = f(x[i]) for the leaf's cells
71def ew1_loop(~f: @+a: F32 -> F32, k: Nat, +i: U32, +l: U32, o: Array<F32>, r: Array<F32> & F32) -> Array<F32>:
72  match k r:
73    case 0n Tuple{a, +x}: o
74    case 1n+q Tuple{a, +x}: ew1_loop(~f, q, (i + l : U32), l, Array.set(F32, o, i, f(x)), Array.get(F32, a, (i + l : U32)))

Uses (9)

Used by (1)