CppAD: A C++ Algorithmic Differentiation Package  20130918
template<class Base>
void CppAD::player< Base >::forward_next ( 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 forward_start to initialize to the first operator; i.e., the BeginOp at the beginning of the recording. We use the notation forward_routine to denote the set forward_start, forward_next, forward_csum, forward_cskip.

Parameters:
op[in,out] The input value of op must be its output value from the previous call to a forward_routine. Its output value is the next operator in the recording. For speed, forward_next does not check for the special cases where op == CSumOp or op == CSkipOp. In these cases, the other return values from forward_next must be corrected by a call to forward_csum or forward_cskip respectively.
op_arg[in,out] The input value of op_arg must be its output value form the previous call to a forward routine. Its output value is the beginning of the vector of argument indices for this operation.
op_index[in,out] The input value of op_index must be its output value form the previous call to a forward routine. Its output value is the index of the next operator in the recording. Thus the ouput value following the previous call to forward_start is one. In addition, the output value increases by one with each call to forward_next.
var_index[in,out] The input value of var_index must be its output value form the previous call to a forward routine. Its output value is the index of the primary (last) result corresponding to the operator op.

Definition at line 352 of file player.hpp.

Referenced by CppAD::ForJacSweep(), CppAD::forward0sweep(), CppAD::forward1sweep(), and CppAD::optimize::optimize_run().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines