Prev Next TapeRec

A CppAD Program as Recorded on Tape

Syntax
TapeRec<BaseRec
TapeRec<BaseRec(const TapeRec<Base> &Other)

Default Constructors
The default constructor
     TapeRec<
BaseRec
creates a program recording called Rec with no contents and some default setting for the size of its buffers.

Copy Constructor
The copy constructor
     TapeRec<
BaseRec(const TapeRec<Base> &Other)
creates Rec as a program recording with all the same information as Other and with the smallest possible buffer sizes that will hold that information.

Erase
The syntax
     void 
Rec.Erase()
erases the contents of Rec. The buffers used to store the tape information are returned to the system (so as to conserve on memory).

Put

Op
The function call
     inline size_t 
Rec.PutOp(OpCode op)
places the value op at the end of the current Op recording and returns the offset for the corresponding variable (if the operator has a resulting variable). With each call, this index increments by the number of variables required for the previous call to PutOp.

Ind
The function call
     inline void 
Rec.PutInd(size_t ind0)
     inline void 
Rec.PutInd(size_t ind0, size_t ind1)
     
.
     
.
     
.
     inline void 
Rec.PutInd(
          size_t 
ind0
          size_t 
ind1
          size_t 
ind2
          size_t 
ind3,
          size_t 
ind4
          size_t 
ind5)
places the values passed to PutInd at the end of the Ind recording and in the order passed; i.e., ind0 comes before ind1 e.t.c.

Par
The function call
     inline size_t 
Rec.PutPar(const Base &par)
places the value par in the Par recording and returns its index with in the recording. This value is not necessarily placed at the end of the recording so there is no specified pattern to the return values.

VecInd
The function call
     inline size_t 
Rec.PutVecInd(size_t vecInd)
places the value vecInd at the end of the current VecInd recording and returns its index with in the recording. This index starts at zero after each Erase or default constructor and increments by one for each call to this function.

Get

Op
The syntax
     OpCode 
Rec.GetOp(size_t i) const
returns the value of op in the i+1-th call to Rec.PutOp(op).

VecInd
The syntax
     OpCode 
Rec.GetVecInd(size_t i) const
returns the value of vecInd in the corresponding call Rec.PutVecInd(vecInd) where i is the return value of PutVecInd.

Ind
The syntax
     const size_t *
Rec.GetInd(size_t n, size_t i) const
returns a pointer to a copy of n values in the Ind recording starting at the index i.

Par
The syntax
     const 
Base *Rec.GetPar(size_t i) const
returns a pointer to a value equal to par in the corresponding call Rec.PutPar(par) where i is the return value of PutPar. (If NDEBUG is not defined, GetPar checks that the argument i is valid.)

Num

Op
The syntax
     size_t 
Rec.NumOp(void) const
returns the number of Op values that are currently stored in Rec. This increments by one each time PutOp is called; i.e., it is the number of calls to PutOp.

Ind
The syntax
     size_t 
Rec.NumInd(void) const
returns the number of Ind values that are currently stored in Rec. This increments by one for each value that is stored by PutInd. The syntax
     size_t 
Rec.NumVecInd(void) const
returns the number of VecInd values that are currently stored in Rec. This increments by one each time PutVecInd is called.

Par
The syntax
     size_t 
Rec.NumPar(void) const
returns the number of Par values that are currently stored in Rec. This increment by one or zero each time PutPar is called.

Replace

Ind
The syntax
     size_t 
Rec.ReplaceInd(size_t index, size_t value)
Replaces the single value with index index in the sequence of Ind values stored by calls to Rec.PutInd. The argument index must be less than Rec.NumInd().

Memory
The syntax
     size_t 
Rec.Memory(void) const
returns the number of memory units (sizeof) required to store the information in Rec.
Input File: cppad/local/tape_rec.hpp