CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
void CppAD::local::optimize::get_opt_op_info ( bool  conditional_skip,
bool  compare_op,
bool  print_for_op,
const player< Base > *  play,
const vector< size_t > &  dep_taddr,
vector< struct_cexp_info > &  cexp_info,
sparse_list &  skip_op_true,
sparse_list &  skip_op_false,
vector< bool > &  vecad_used,
vector< struct_opt_op_info > &  opt_op_info 
)

Get variable to operator map and operator basic operator information.

Template Parameters
Basebase type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base.
Parameters
conditional_skipIf conditional_skip this is true, the conditional expression information cexp_info will be calculated. This may be time intensive and may not have much benefit in the optimized recording.
compare_opif this is true, arguments are considered used if they appear in compare operators. This is a side effect because compare operators have boolean results (and the result is not in the tape; i.e. NumRes(op) is zero for these operators. (This is an example of a side effect.)
print_for_opif this is true, arguments are considered used if they appear in print forward operators; i.e., PriOp. This is also a side effect; i.e. NumRes(PriOp) is zero.
playThis is the old operation sequence.
dep_taddris a vector of variable indices for the dependent variables.
cexp_infoThe input size of this vector must be zero. If conditional_skip is false, cexp_info is not changed. Otherwise, upon return cexp_info has size equal to the number of conditional expressions in the operation sequence; i.e., the number of CExpOp operators. The value cexp_info[j] is the information corresponding to the j-th conditional expression in the operation sequence. This vector is in the same order as the operation sequence; i.e. if j1 > j2, cexp_info[j1].i_op > cexp_info[j2].i_op. Note that skip_op_true and skip_op_false could be part of this structure, but then we would allocate and deallocate two vectors for each conditonal expression in the operation sequence.
skip_op_trueThis vector of sets is empty on input. Upon return, the j-th set is the operators that are not used when comparison result for cexp_info[j] is true. Note that UsrapOp, UsravOp, UsrrpOp, and UsrrvOp, are not in this set and should be skipped when the corresponding UserOp are skipped.
skip_op_falseThis vector of sets is empty on input. Upon return, the j-th set is the operators that are not used when comparison result for cexp_info[j] is false. Note that UsrapOp, UsravOp, UsrrpOp, and UsrrvOp, are not in this set and should be skipped when the corresponding UserOp are skipped.
vecad_usedThe input size of this vector must be zero. Upon retun it has size equal to the number of VecAD vectors in the operations sequences; i.e., play->num_vecad_vec_rec(). The VecAD vectors are indexed in the order that thier indices apprear in the one large play->GetVecInd that holds all the VecAD vectors.
opt_op_infoThe input size of this vector must be zero. Upon return it has size equal to the number of operators in the operation sequence; i.e., num_op = play->nun_var_rec(). The value opt_op_info[i] have been set to the values corresponding to the i-th operator in the operation sequence.

operator depends on. The operator can be skipped if any of the

It is also left empty for the result of any VecAD operations.

Definition at line 200 of file get_opt_op_info.hpp.

Referenced by optimize_run().