CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Reverse mode for op = LdpOp or LdvOp.
The C++ source code corresponding to this operation is
v[x] = y
where v is a VecAD<Base> vector, x is an AD<Base> object, and y is AD<Base> or Base objects. We define the index corresponding to v[x] by
i_v_x = index_by_ind[ arg[0] + i_vec ]
where i_vec is defined under the heading arg[1] below:
This routine is given the partial derivatives of a function G(z , y[x] , w , u ... ) and it uses them to compute the partial derivatives of
H( y[x] , w , u , ... ) = G[ z( y[x] ) , y[x] , w , u , ... ]
Base | base type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base. |
op | is the code corresponding to this operator; i.e., LdpOp or LdvOp (only used for error checking). |
d | highest order the Taylor coefficient that we are computing the partial derivative with respect to. |
i_z | is the AD variable index corresponding to the variable z. |
arg | arg[2] Is the index of this vecad load instruction in the var_by_load_op array. |
cap_order | number of columns in the matrix containing the Taylor coefficients (not used). |
taylor | matrix of Taylor coefficients (not used). |
nc_partial | number of colums in the matrix containing all the partial derivatives (not used if arg[2] is zero). |
partial | If arg[2] is zero, y[x] is a parameter and no values need to be modified; i.e., partial is not used. Otherwise, y[x] is a variable and: partial [ i_z * nc_partial + k ] for k = 0 , ... , d is the partial derivative of G with respect to the k-th order Taylor coefficient for z. If arg[2] is not zero, partial [ arg[2] * nc_partial + k ] for k = 0 , ... , d is the partial derivative with respect to the k-th order Taylor coefficient for x. On input, it corresponds to the function G, and on output it corresponds to the the function H. |
var_by_load_op | is a vector with size play->num_load_op_rec(). It contains the variable index corresponding to each load instruction. In the case where the index is zero, the instruction corresponds to a parameter (not variable). |
Definition at line 547 of file load_op.hpp.
Referenced by reverse_sweep().