Initialize in_subgraph corresponding to a single dependent variable (and a selected set of independent variables).
- Template Parameters
-
Base | this operation sequence was recording using AD<Base>. |
- Parameters
-
play | is the operation sequence corresponding to the ADFun<Base> function (it must correspond to map_user_op_). |
select_domain | is a vector with, size equal to the number of independent variables in the recording. It determines the selected independent variables. |
- in_subgraph_
- We use depend_yes (depend_no) for the value n_dep_ (n_dep_ + 1). The important properties are that depend_yes < depend_no and for a valid indpendent variable index i_ind < depend_yes. The input size and elements of in_subgraph_ do not matter. If in_subgraph_[i_op] == depend_yes (depend_no), the result for this operator depends (does not depend) on the selected independent variables. Note that for user function call operators i_op, in_subgraph[i_op] is depend_no except for the first UserOp in the atomic function call sequence. For the first UserOp, it is depend_yes (depend_no) if any of the results for the call sequence depend (do not depend) on the selected independent variables. Except for UserOP, only operators with NumRes(op) > 0 have in_subgraph_ value depend_yes; e.g., comparision operators have in_subgraph_ value depend_no.
- select_domain_
- This vector is is set equal to the select_domain argument.
- process_range_
- This vector is to to size n_dep_ and its values are set to false
Definition at line 65 of file init_rev.hpp.
Referenced by CppAD::local::subgraph::subgraph_sparsity().