def pair_join

bendtorch-core@0.1.0.0 · src/tensor/parallel.bend:35

import bendtorch-core@0.1.0.0/src/tensor/parallel.bend as Parallel
import Base

35# The depth-1 tree, cells `base` and `base + 1`: the second cell reads the
36# state the first hands back, and the node of the two leaves is built here.
37# The bottom level of every deeper tree runs this, so no leaf returns
38# through `leaf` and half of the tree's nodes create no closure. The second
39# cell is `Nat.add(1n, base)`, which is `upper(0n, base)` but a flat add.
40def pair_join(~S: Type, x: F32, high: F32 & S) -> Array<F32> & S:
41  (y, state) = high
42  (ANode{ALeaf{x}, ALeaf{y}}, state)

Uses (4)

Used by (12)