Prev Next ADTape

ADTape: The CppAD Tape

Syntax
ADTape<BaseTape

Description
For each Base that is used in connection with 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.

Rec
the recorder object Tape.Rec contains the currently recorded information. This information is recorded using the following functions:

Parameter
The procedure call
     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.

Variable Indexed Arrays
The procedure call
     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)

Input File: cppad/local/ad_tape.hpp