1 #ifndef CPPAD_CG_OPERATION_INCLUDED
2 #define CPPAD_CG_OPERATION_INCLUDED
91 inline std::ostream& operator<<(std::ostream& os,
const CGOpCode& op) {
92 static const char* OpNameTable[] = {
100 "new sparseArray[size]",
106 "atomicFunction.forward(q, p, vx, vy, tx, ty)",
107 "atomicFunction.reverse(p, tx, ty, px, py)",
108 "result = ($1 < $2)? $3 : $4",
109 "result = ($1 <= $2)? $3 : $4",
110 "result = ($1 == $2)? $3 : $4",
111 "result = ($1 >= $2)? $3 : $4",
112 "result = ($1 > $2)? $3 : $4",
113 "result = ($1 != $2)? $3 : $4",
135 "dep($1) = ($2) + ...",
139 "index = expression()",
147 "bool(index expression)",
157 CPPADCG_ASSERT_UNKNOWN(
size_t(CGOpCode::NumberOp) + 1 ==
sizeof(OpNameTable)/
sizeof(OpNameTable[0]));
160 CPPADCG_ASSERT_UNKNOWN(
int(op) >= 0 &&
size_t(op) <
size_t(CGOpCode::NumberOp));
162 os << OpNameTable[size_t(op)];