CppAD: A C++ Algorithmic Differentiation Package
20171217
|
|
inline |
Forward mode, except for zero order, for op = LdpOp or op = 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:
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. |
play | is the tape that this operation appears in. This is for error detection and not used when NDEBUG is defined. |
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. |
r | is the number of directions for the Taylor coefficients that we are computing. |
cap_order | number of columns in the matrix containing the Taylor coefficients. |
tpv = (cap_order-1) * r + 1
which is the number of Taylor coefficients per variablei_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. |
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). |
i_var = size_t( var_by_load_op[ arg[2] ] )
taylor | Input If i_var > 0 , v[x] is a variable and for k = 1 , ... , q taylor[ i_var * tpv + (k-1)*r+1+ell ] is the k-th order coefficient for v[x] in the ell-th direction, Output for k = p , ... , q, taylor[ i_z * tpv + (k-1)*r+1+ell ] is set to the k-order Taylor coefficient for z in the ell-th direction. |
Definition at line 414 of file load_op.hpp.
Referenced by forward1sweep(), and forward2sweep().