CppAD: A C++ Algorithmic Differentiation Package 20110419
template<class Base >
void reverse_load_op ( OpCode  op,
size_t  d,
size_t  i_z,
const size_t *  arg,
size_t  nc_taylor,
const Base *  taylor,
size_t  nc_partial,
Base *  partial 
) [inline]

Reverse mode for op = LdpOp or LdvOp.

The C++ source code corresponding to this operation is

	z = y[x]

where y is a VecAD<Base> vector and x is an AD<Base> or Base index.

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 , ... ]
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:
opis the code corresponding to this operator; i.e., LdpOp or LdvOp (only used for error checking).
dhighest order the Taylor coefficient that we are computing the partial derivative with respect to.
i_zis the AD variable index corresponding to the variable z.
argarg[2] If y[x] is a parameter, arg[2] is zero (which is not a valid variable index). If y[x] is a variable, arg[2] is the variable index corresponding to y[x].
nc_taylornumber of columns in the matrix containing the Taylor coefficients (not used).
taylormatrix of Taylor coefficients (not used).
nc_partialnumber of colums in the matrix containing all the partial derivatives (not used if arg[2] is zero).
partialIf 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.
Checked Assertions
  • NumArg(op) == 3
  • NumRes(op) == 1
  • d < nc_taylor
  • arg[2] < i_z

Definition at line 268 of file load_op.hpp.

Referenced by ReverseSweep().