CppAD: A C++ Algorithmic Differentiation Package
20130102
|
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.
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 | is the order of the Taylor coefficient that we are computing. |
i_z | is the AD variable index corresponding to the variable z. |
arg | arg[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_taylor | number of columns in the matrix containing the Taylor coefficients. |
taylor | Input: 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. |
Definition at line 170 of file load_op.hpp.
Referenced by forward_sweep().