CppAD: A C++ Algorithmic Differentiation Package
20130918
|
void CppAD::forward_load_op | ( | OpCode | op, |
size_t | p, | ||
size_t | q, | ||
size_t | i_z, | ||
const addr_t * | arg, | ||
size_t | nc_taylor, | ||
Base * | taylor, | ||
const addr_t * | var_by_load_op | ||
) | [inline] |
Forward mode, except for zero order, for op = LdpOp or op = LdvOp.
The C++ source code corresponding to this operation is
z = v[x]
where v 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). |
p | is the lowest order of the Taylor coefficient that we are computing. |
q | is the highest order of the Taylor coefficient that we are computing. |
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. |
nc_taylor | number of columns in the matrix containing the Taylor coefficients. |
taylor | Input If v[x] is a variable, taylor[ arg[2] * nc_taylor + k ] for k = 0 , ... , q, is the k-order Taylor coefficient corresponding to v[x]. Output taylor[ i_z * nc_taylor + d ] for k = p , ... , q, is set to the k-order Taylor coefficient for the variable z. |
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 361 of file load_op.hpp.
Referenced by forward1sweep().