def tsx_leaf
import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpuimport Base
1427# 2. the 2^l cells from lo: e = exp(x - m) written over each, and their sum as a balanced tree of pairs (h = 2^(l-1))
1428def tsx_leaf(+lo: U32, +m: F32, r: Array<F32> & F32) -> TS:
1429 match r:
1430 case Tuple{a, +x}:
1431 +e = F32.exp((x - m : F32))
1432 TS{Array.set(F32, a, lo, e), e}