1 # ifndef CPPAD_LOCAL_OPTIMIZE_RECORD_PV_HPP
2 # define CPPAD_LOCAL_OPTIMIZE_RECORD_PV_HPP
18 namespace CppAD {
namespace local {
namespace optimize {
73 const Base* par = play->
GetPar();
80 new_arg[0] = rec->
PutPar( par[arg[0]] );
81 new_arg[1] = old2new[ play->
var2op(arg[1]) ].new_var;
82 rec->
PutArg( new_arg[0], new_arg[1] );
addr_t PutOp(OpCode op)
Put next operator in the operation sequence.
size_t num_par_rec(void) const
Fetch number of parameters in the recording.
The CppAD Simple Vector template class.
CPPAD_TAPE_ADDR_TYPE addr_t
Class used to store and play back an operation sequence recording.
void PutArg(addr_t arg0)
Put one operation argument index in the recording.
size_t NumRes(OpCode op)
Number of variables resulting from the specified operation.
addr_t PutPar(const Base &par)
Find or add a parameter to the current vector of parameters.
OpCode
Type used to distinguish different AD< Base > atomic operations.
Class used to store an operation sequence while it is being recorded (the operation sequence is copie...
void get_op_info(size_t op_index, OpCode &op, const addr_t *&op_arg, size_t &var_index) const
fetch the information corresponding to an operator
size_t i_var
operator index for this variable
#define CPPAD_ASSERT_UNKNOWN(exp)
Check that exp is true, if not terminate execution.
size_t num_op_rec(void) const
Number of operators currently stored in the recording.
size_t var2op(size_t var_index) const
fetch the operator corresponding to a primary variable
Base GetPar(size_t i) const
Fetch a parameter from the recording.
struct_size_pair record_pv(const player< Base > *play, const CppAD::vector< struct struct_old2new > &old2new, size_t i_op, recorder< Base > *rec)
Record an operation of the form (parameter op variable).