CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
void CppAD::local::forward_pri_0 ( std::ostream &  s_out,
const addr_t *  arg,
size_t  num_text,
const char *  text,
size_t  num_par,
const Base *  parameter,
size_t  cap_order,
const Base *  taylor 
)
inline

Print operation for parameters; i.e., op = PriOp.

The C++ source code corresponding to this operation is

     f.Forward(0, x)
     PrintFor(before, var)
     PrintFor(pos, before, var, after)

The PrintFor call puts the print operation on the tape and the print occurs during the zero order forward mode computation.

Template Parameters
Basebase type for the operator; i.e., this operation was recorded using AD< Base > and computations by this routine are done using type Base .
Parameters
s_outthe results are printed on this output stream.
argarg[0] & 1
If this is zero, pos is a parameter. Otherwise it is a variable.
arg[0] & 2
If this is zero, var is a parameter. Otherwise it is a variable.

arg[1]
If pos is a parameter, parameter[arg[1]] is its value. Othwise taylor[ arg[1] * cap_order + 0 ] is the zero order Taylor coefficient for pos.

arg[2]
index of the text to be printed before var if pos is not a positive value.

arg[3]
If var is a parameter, parameter[arg[3]] is its value. Othwise taylor[ arg[3] * cap_order + 0 ] is the zero order Taylor coefficient for var.

arg[4]
index of the text to be printed after var if pos is not a positive value.
num_textis the total number of text characters on the tape (only used for error checking).
textInput: text[arg[1]] is the first character of the text that will be printed. All the characters from there to (but not including) the first '\0' are printed.
num_paris the total number of values in the parameter vector
parameterContains the value of parameters.
cap_ordernumber of colums in the matrix containing all the Taylor coefficients.
taylorContains the value of variables.
Checked Assertions:
  • NumArg(PriOp) == 5
  • NumRes(PriOp) == 0
  • text != CPPAD_NULL
  • arg[1] < num_text
  • if pos is a parameter, arg[1] < num_par
  • if var is a parameter, arg[3] < num_par

Definition at line 103 of file print_op.hpp.

Referenced by forward0sweep(), and forward1sweep().