41#include "../../expressions/activeType.hpp"
42#include "../../misc/exceptions.hpp"
44#include "../../misc/memberStore.hpp"
45#include "statementEvaluatorInterface.hpp"
57 template<
typename T_Real>
70 template<
typename Tape,
typename... Args>
74 CODI_EXCEPTION(
"ReverseStatementEvaluator does not support forward evaluation calls.");
80 template<
typename Tape,
typename... Args>
84 CODI_EXCEPTION(
"ReverseStatementEvaluator does not support primal evaluation calls.");
90 template<
typename Tape,
typename... Args>
94 func(std::forward<Args>(args)...);
98 template<
typename Tape,
typename Generator,
typename Expr>
100 return (
Handle*)Generator::template statementEvaluateReverse<Expr>;
108 template<
typename Tape>
109 using HandleTyped =
decltype(&Tape::template statementEvaluateReverse<ActiveType<Tape>>);
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
Only stores the function handle for the reverse evaluation.
Definition reverseStatementEvaluator.hpp:58
static Handle createHandle()
Definition reverseStatementEvaluator.hpp:99
decltype(&Tape::template statementEvaluateReverse< ActiveType< Tape > >) HandleTyped
Full reverse function type.
Definition reverseStatementEvaluator.hpp:109
static void callReverse(Handle const &h, Args &&... args)
Definition reverseStatementEvaluator.hpp:91
static Real callForward(Handle const &h, Args &&... args)
Throws CODI_EXCEPTION on call.
Definition reverseStatementEvaluator.hpp:71
T_Real Real
See ReverseStatementEvaluator.
Definition reverseStatementEvaluator.hpp:59
static Real callPrimal(Handle const &h, Args &&... args)
Throws CODI_EXCEPTION on call.
Definition reverseStatementEvaluator.hpp:81
void * Handle
Function pointer to the reverse evaluation.
Definition reverseStatementEvaluator.hpp:67
Creation of handles for the evaluation of expressions in a context where the expression type is not a...
Definition statementEvaluatorInterface.hpp:103