def tree1
bend-ml-tensor-gpu@0.1.5.1 · main.bend:405
import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpu
import Base
405def tree1(~E: Data, ~f: @+t: U32 -> @+l: U32 -> @+e: E -> Array<F32> -> Array<F32> -> Array<F32> -> Array<F32> -> Array<F32> -> Array<F32>, +d: Nat, +t: U32, +l: U32, +e: E, +x1: Array<F32>, +x2: Array<F32>, +x3: Array<F32>, +x4: Array<F32>, +oa: Array<F32>) -> Array<F32>:
406 match d:
407 case 0n: f(t, l, e, x1, x2, x3, x4, oa)
408 case 1n+q:
409 x y = tree1(~E, ~f, q, (t * 2 : U32), l, e, x1, x2, x3, x4, oa) tree1(~E, ~f, q, ((t * 2 : U32) + 1 : U32), l, e, x1, x2, x3, x4, oa)
410 Array.join(F32, x, y)
411
412@unsafe