CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CppAD::local::recorder< Base > Class Template Reference

Class used to store an operation sequence while it is being recorded (the operation sequence is copied to the player class for playback). More...

Public Member Functions

void free (void)
 Frees all information in recording. More...
 
size_t get_abort_op_index (void)
 Get the abort index. More...
 
size_t Memory (void) const
 Approximate amount of memory used by the recording. More...
 
size_t num_load_op_rec (void) const
 Number of LdpOp and LdvOp operations currently in the recording. More...
 
size_t num_op_rec (void) const
 Number of operators currently stored in the recording. More...
 
size_t num_var_rec (void) const
 Number of variables currently stored in the recording. More...
 
void PutArg (addr_t arg0)
 Put one operation argument index in the recording. More...
 
void PutArg (addr_t arg0, addr_t arg1)
 Put two operation argument index in the recording. More...
 
void PutArg (addr_t arg0, addr_t arg1, addr_t arg2)
 Put three operation argument index in the recording. More...
 
void PutArg (addr_t arg0, addr_t arg1, addr_t arg2, addr_t arg3)
 Put four operation argument index in the recording. More...
 
void PutArg (addr_t arg0, addr_t arg1, addr_t arg2, addr_t arg3, addr_t arg4)
 Put five operation argument index in the recording. More...
 
void PutArg (addr_t arg0, addr_t arg1, addr_t arg2, addr_t arg3, addr_t arg4, addr_t arg5)
 Put six operation argument index in the recording. More...
 
addr_t PutLoadOp (OpCode op)
 Put a vecad load operator in the operation sequence (special case) More...
 
addr_t PutOp (OpCode op)
 Put next operator in the operation sequence. More...
 
addr_t PutPar (const Base &par)
 Find or add a parameter to the current vector of parameters. More...
 
addr_t PutTxt (const char *text)
 Put a character string in the text for this recording. More...
 
addr_t PutVecInd (size_t vec_ind)
 Add a value to the end of the current vector of VecAD indices. More...
 
 recorder (void)
 Default constructor. More...
 
void ReplaceArg (size_t i_arg, size_t value)
 Replace an argument value in the recording (intended to fill in reserved values). More...
 
size_t ReserveArg (size_t n_arg)
 Reserve space for arguments, but delay placing values there. More...
 
void set_abort_op_index (size_t abort_op_index)
 Set the abort index. More...
 
 ~recorder (void)
 Destructor. More...
 

Private Attributes

size_t abort_op_index_
 operator index at which to abort recording with an error (do not abort when zero) More...
 
pod_vector< addr_targ_vec_
 The argument indices in the recording. More...
 
size_t num_load_op_rec_
 Number vecad load operations (LdpOp or LdvOp) currently in recording. More...
 
size_t num_var_rec_
 Number of variables in the recording. More...
 
pod_vector< OpCodeop_vec_
 The operators in the recording. More...
 
pod_vector< Base > par_vec_
 The parameters in the recording. Note that Base may not be plain old data, so use false in consructor. More...
 
pod_vector< char > text_vec_
 Character strings ('\0' terminated) in the recording. More...
 
const size_t thread_offset_
 offset for this thread in the static hash table More...
 
pod_vector< addr_tvecad_ind_vec_
 The VecAD indices in the recording. More...
 

Friends

class player< Base >
 

Detailed Description

template<class Base>
class CppAD::local::recorder< Base >

Class used to store an operation sequence while it is being recorded (the operation sequence is copied to the player class for playback).

Template Parameters
BaseThis is an AD< Base > operation sequence recording; i.e., it records operations of type AD< Base >.

Definition at line 28 of file declare_ad.hpp.


The documentation for this class was generated from the following files: