Docs / nablatensor-core / com.nablatensor.engine

final class

AadTape

A recorded scalar computation graph: the "kernel" in kernel-AAD terms.

Nodes are appended in evaluation order, so the array order is already a valid topological order for the forward sweep and its reverse is a valid order for the adjoint sweep. Recording happens once; the tape is then translated into a device kernel and replayed for every scenario.

Methods

int size()
AadOp op(int node)
int argA(int node)
int argB(int node)
double constant(int node)
boolean isActive(int node)
int inputCount()
int inputNode(int index)
String inputName(int index)
List<String> inputNames()
double[] recordedInputs()

Input values as seen during recording; the starting point for a replay.

int randCount()

Normal draws per scenario on the default stream — the common single-stream total.

int randStreamCount()

Number of independent random streams; 1 unless rec.stream(name) was used.

String randStreamName(int stream)
int randNormalCount(int stream)

Standard-normal draws per scenario on stream.

int randUniformCount(int stream)

Uniform [0,1) draws per scenario on stream.

int randStreamOf(int node)

For a RANDN/RANDU node: which stream it draws from.

int randOrdinal(int node)

For a RANDN/RANDU node: its 0-based index within its (stream, kind).

int randTotal()

Total random draws per scenario across every stream and both kinds.

int randStreamOffset(int stream)

Flat-buffer offset of stream's draws in the layout [s0 normals | s0 uniforms | s1 normals | ...].

int randFlatIndex(int node)

Flat-buffer index of a RANDN/RANDU node's draw.

boolean hasExtendedRandom()

Whether the tape uses anything beyond a single stream of standard-normal draws.

int outputNode()

Node index of the primary (first-recorded) output.

int outputCount()

Number of recorded outputs; 1 for a single rec.output(...).

int outputNode(int i)

Node index of output i, in recording order.

String outputName(int i)

Name of output i; "value" for a single unnamed output.

List<String> outputNames()
String toString()