|
CppAD: A C++ Algorithmic Differentiation Package
20130102
|
| void forward_comp_op_0 | ( | size_t & | count, |
| const addr_t * | arg, | ||
| size_t | num_par, | ||
| const Base * | parameter, | ||
| size_t | nc_taylor, | ||
| Base * | taylor | ||
| ) | [inline] |
Zero order forward mode execution of op = CompOp.
The C++ source code corresponding to this operation is
left Cop right
where Cop is one of the following: <, <=, == , >=, >, !=.
| 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. |
| count | If the comparision has the same result as when t operation seqeunce was recorded, count is not affected. Otherwise it is incremented by one. |
| arg | arg[0] is static cast to size_t from the enum type
enum CompareOp {
CompareLt,
CompareLe,
CompareEq,
CompareGe,
CompareGt,
CompareNe
}
arg[1] & 1 If this expression is true, the result of the comparison during taping it true. Othwise the result if false. arg[1] & 2 if this expression is true, left is a variable, otherwise it is a parameter. arg[1] & 4 if this expression is true, right is a variable, otherwise it is a parameter. |
| num_par | is the lenght of the parameter vector. This value is only used for checking assumptions mentioned below (and is not used at all when NDEBUG is defined). |
| parameter | Vector of parameters corresponding to the tape. If left is a parameter, parameter[ arg[2] ] is its value. If right is a parameter, parameter[ arg[3] ] is its value. |
| nc_taylor | number of columns in the matrix containing the Taylor coefficients. |
| taylor | Matrix of Taylor coefficients. If left is a variable, taylor[ arg[2] * nc_taylor + 0 ] is its value. If right is a variable, taylor[ arg[3] * nc_taylor + 0 ] is its value. |
Definition at line 108 of file comp_op.hpp.
Referenced by forward0sweep(), and forward_sweep().