1 # ifndef CPPAD_LOCAL_SUBGRAPH_GET_REV_HPP
2 # define CPPAD_LOCAL_SUBGRAPH_GET_REV_HPP
19 namespace CppAD {
namespace local {
namespace subgraph {
83 template <
typename Base>
106 size_t i_var = dep_taddr[i_dep];
109 size_t i_op = play->
var2op(i_var);
127 size_t sub_index = 0;
128 while(sub_index < subgraph.
size() )
130 i_op = subgraph[sub_index];
141 for(
size_t j = 0; j < argument_variable.
size(); ++j)
143 size_t j_var = argument_variable[j];
144 size_t j_op = play->
var2op(j_var);
size_t n_op_
number of operatros in operation sequence
void resize(size_t n)
resize the vector (existing elements preserved when n <= capacity_).
void push_back(const Type &e)
Add an element to theh back of this vector.
subgraph information attached to a operation sequence
CPPAD_TAPE_ADDR_TYPE addr_t
Class used to store and play back an operation sequence recording.
size_t NumRes(OpCode op)
Number of variables resulting from the specified operation.
File used to define pod_vector class.
void get_rev(const player< Base > *play, const vector< size_t > &dep_taddr, addr_t i_dep, pod_vector< addr_t > &subgraph)
Get the subgraph corresponding to a dependent variables (and a selected set of independent variables)...
size_t n_dep_
number of dependent variables for this function
void get_argument_variable(const player< Base > *play, size_t i_op, pod_vector< size_t > &variable, pod_vector< bool > &work)
Determine the set of arguments, for an operator, that are variables.
pod_vector< bool > process_range_
flags which dependent variables have been processed since the previous init_rev
OpCode
Type used to distinguish different AD< Base > atomic operations.
pod_vector< addr_t > in_subgraph_
flags which operatiors are in subgraph (size zero or n_op_).
pod_vector< addr_t > map_user_op_
Mapping atomic call operators to UserOp that begins call sequence, other operators are not changed by...
size_t size(void) const
current number of elements in this vector.
Determine arguments that are variables.
#define CPPAD_ASSERT_UNKNOWN(exp)
Check that exp is true, if not terminate execution.
size_t var2op(size_t var_index) const
fetch the operator corresponding to a primary variable
OpCode GetOp(size_t i) const
fetch an operator from the recording.
pod_vector< bool > select_domain_
flags which dependent variables are selected