1#ifndef CPPAD_CG_EVALUATOR_ADOLC_INCLUDED
2#define CPPAD_CG_EVALUATOR_ADOLC_INCLUDED
18#include <adolc/adolc.h>
19#include <adolc/drivers/drivers.h>
24inline adouble abs(
const adouble& val) {
28inline adouble
sign(
const adouble& val) {
35inline adouble condExpLt(
const adouble& left,
const adouble& right,
36 const adouble& exp_if_true,
const adouble& exp_if_false) {
38 condassign(temp, right - left, exp_if_true, exp_if_false);
42inline adouble condExpLe(
const adouble& left,
const adouble& right,
const adouble& exp_if_true,
const adouble& exp_if_false) {
46inline adouble condExpEq(
const adouble& left,
const adouble& right,
47 const adouble& exp_if_true,
const adouble& exp_if_false) {
51inline adouble condExpGe(
const adouble& left,
const adouble& right,
52 const adouble& exp_if_true,
const adouble& exp_if_false) {
56inline adouble condExpGt(
const adouble& left,
const adouble& right,
57 const adouble& exp_if_true,
const adouble& exp_if_false) {
59 condassign(temp, left - right, exp_if_true, exp_if_false);
63inline adouble condExpNe(
const adouble& left,
const adouble& right,
64 const adouble& exp_if_true,
const adouble& exp_if_false) {
71 const adouble& trueCase,
72 const adouble& falseCase) {
75 return condExpLt(left, right, trueCase, falseCase);
77 return condExpLe(left, right, trueCase, falseCase);
79 return condExpEq(left, right, trueCase, falseCase);
81 return condExpGe(left, right, trueCase, falseCase);
83 return condExpGt(left, right, trueCase, falseCase);
85 return condExpNe(left, right, trueCase, falseCase);
97template<
class ScalarIn>
bool GreaterThanZero(const cg::CG< Base > &x)
cg::CG< Base > sign(const cg::CG< Base > &x)