Docs / nablatensor-core / com.nablatensor.engine
final class
FlatTape
A recorded tape copied into flat parallel arrays, once, at compile time.
Every host engine walks the same tape millions of times. Calling op(int) and friends per node per scenario costs a bounds check and a field load that no amount of JIT will hoist out of the scenario loop, so each engine used to flatten the tape into its own set of arrays in its own constructor. This is that copy, written once.
Fields are final arrays rather than accessors deliberately: the sweeps read them in their innermost loop, and a plain array read is what C2 turns into a single load.
Public only so the engine modules can use it; not part of the supported API.
Constructors
Fields
Opcode per node.
First argument per node: a node index, or an input index for INPUT.
Second argument per node: a node index, or a stream index for the draws.
Literal value for CONST nodes, zero elsewhere.
Whether a node is on a path from some input to some output.
Node index of each differentiable input, in input order.
Node index of each recorded output, in recording order.
Number of independent random streams the tape draws from.
Methods
nodes multiplied by stride, for a sweep that stores stride scenarios side by side per node and therefore indexes rows rather than nodes.