CppAD: A C++ Algorithmic Differentiation Package
20130102
|
void player< Base >::next_forward | ( | OpCode & | op, |
const addr_t *& | op_arg, | ||
size_t & | op_index, | ||
size_t & | var_index | ||
) | [inline] |
Fetch the next operator during a forward sweep.
Use start_forward to initialize to the first operator; i.e., the BeginOp at the beginning of the recording.
op | The input value of op does not matter. Its output value is the next operator in the recording. For speed, next_forward does not check for the special case of op == CSumOp . In this case, the other return values from next_forward must be corrected by a call to forward_csum . |
op_arg | The input value of *op_arg does not matter. Its output value is the beginning of the vector of argument indices for this operation. |
op_index | The input value of op_index does not matter. Its output value is the index of the next operator in the recording. Thus the ouput value following the previous call to start_forward is one. In addition, the output value increases by one with each call to next_forward. |
var_index | The input value of var_index does not matter. Its output value is the index of the primary (last) result corresponding to the operator op. |
Definition at line 361 of file player.hpp.
Referenced by ForJacSweep(), forward0sweep(), forward_sweep(), and optimize().