| Prev | Next | ADTape |
ADTape<Base> Tape
AD<Base>,
there must be one and only one id such that
ADBase<Base>::tape_active(id) is true.
This object is used to record
AD<Base> operations and compute derivatives.
Tape.Rec contains
the currently recorded information.
This information is recorded using the following functions:
size_t Tape.RecordParOp(const Base &z)
creates a ParOp record with the value
specified by z.
The return value is the taddr of this operation in the tape.
size_t Tape.AddVec(size_t length, const Base *data)
adds a variable indexed array with the specified length and values to the tape.
We use i to denote the value returned by AddVec.
The value length is added to Rec as follows:
length == Rec.GetVecInd(i)
Upon return,
the Base value of the elements of data
are stored in Rec
in the following way:
for
j = 0 , \ldots , length-1
,
data[j] == Rec.GetVecInd(i + j + 1)