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

Forward mode, except for zero order, for op = LdpOp or op = 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.

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).
dis the order of the Taylor coefficient that we are computing.
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.
taylorInput: if y[x] is a variable, taylor[ arg[2] * nc_taylor + d ] is the d-order Taylor coefficient corresponding to y[x].
Output: taylor[ i_z * nc_taylor + d ] is the d-order Taylor coefficient for the variable z.
Checked Assertions
  • NumArg(op) == 3
  • NumRes(op) == 1
  • 0 < d < nc_taylor
  • size_t(arg[2]) < i_z

Definition at line 170 of file load_op.hpp.

Referenced by forward_sweep().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines