def tree

bend-ml-tensor-gpu@0.1.5.1 · main.bend:226

import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpu
import Base

226def tree(+e: E, d: Nat, +t: U32, +a: Array<F32>, +b: Array<F32>, +c: Array<F32>) -> Array<F32>:
227  match d:
228    case 0n: leaf(e, t, a, b, c)
229    case 1n++q:
230      l r = tree(e, q, (t * 2 : U32), a, b, c) tree(e, q, ((t * 2 : U32) + 1 : U32), a, b, c)
231      Array.join(F32, l, r)

Uses (9)

Used by (2)