1 # ifndef CPPAD_LOCAL_AD_TAPE_HPP
2 # define CPPAD_LOCAL_AD_TAPE_HPP
16 namespace CppAD {
namespace local {
30 friend class AD<Base>;
39 friend void CppAD::PrintFor <Base> (
46 friend AD<Base> CppAD::CondExpOp <Base> (
60 friend bool CppAD::Parameter <Base>
63 friend bool CppAD::Variable <Base>
77 friend bool CppAD::operator < <Base>
79 friend bool CppAD::operator <= <Base>
133 template <
typename VectorADBase>
135 template <
typename VectorADBase>
136 void Independent(VectorADBase &u,
size_t abort_op_index);
159 template <
class Base>
165 z_taddr = Rec_.PutOp(
ParOp);
166 ind = Rec_.PutPar(z);
197 template <
class Base>
204 size_t start = Rec_.PutVecInd(length);
207 for(i = 0; i < length; i++)
209 value_index = Rec_.PutPar( data[i] );
210 Rec_.PutVecInd( value_index );
addr_t RecordParOp(const Base &x)
Place a parameter in the tape.
void Independent(VectorADBase &u)
Define processor symbols and macros that are used by CppAD.
Class used to hold function objects.
CPPAD_TAPE_ADDR_TYPE addr_t
size_t NumArg(OpCode op)
Number of arguments for a specified operator.
size_t size_independent_
Number of independent variables in this tapes reconding. Set by Independent and effectively const...
size_t NumRes(OpCode op)
Number of variables resulting from the specified operation.
friend bool CppAD::operator(const AD< Base > &left, const AD< Base > &right)
Class used to store an operation sequence while it is being recorded (the operation sequence is copie...
void RecordCondExp(enum CompareOp cop, AD< Base > &returnValue, const AD< Base > &left, const AD< Base > &right, const AD< Base > &trueCase, const AD< Base > &falseCase)
All these operations are done in Rec_, so we should move this routine to recorder<Base>.
#define CPPAD_ASSERT_UNKNOWN(exp)
Check that exp is true, if not terminate execution.
size_t AddVec(size_t length, const pod_vector< Base > &data)
Put initialization for a VecAD<Base> object in the tape.
local::recorder< Base > Rec_
This is where the information is recorded.
Class used to hold a reference to an element of a VecAD object.
Class used to hold tape that records AD<Base> operations.
Vector of AD objects that tracks indexing operations on the tape.
tape_id_t id_
Unique identifier for this tape.
CPPAD_TAPE_ID_TYPE tape_id_t