39#include "../data/position.hpp"
40#include "positionalEvaluationTapeInterface.hpp"
69 template<
typename T_Real,
typename T_Identifier,
typename T_Position>
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
#define CODI_UNDEFINED_VALUE
Used in interface declarations for variables that have to be defined in the specializations.
Definition macros.hpp:117
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
Empty Position with no nested data.
Definition position.hpp:47
Reverse AD evaluation for parts of a recorded tape.
Definition positionalEvaluationTapeInterface.hpp:59
Perform a primal reevaluation of the tape.
Definition primalEvaluationTapeInterface.hpp:70
static bool constexpr RequiresPrimalRestore
True if the primal state changes during a reverse or forward evaluation.
Definition primalEvaluationTapeInterface.hpp:81
void setPrimal(Identifier const &identifier, Real const &gradient)
Set primal value.
T_Position Position
See PrimalEvaluationTapeInterface.
Definition primalEvaluationTapeInterface.hpp:75
Real & primal(Identifier const &identifier)
Writable reference to primal value.
void evaluatePrimal()
Perform a full (forward) reevaluation of the primals in the tape.
static bool constexpr HasPrimalValues
True if the tape has primal values.
Definition primalEvaluationTapeInterface.hpp:80
Real const & getPrimal(Identifier const &identifier) const
Get primal value.
T_Real Real
See PrimalEvaluationTapeInterface.
Definition primalEvaluationTapeInterface.hpp:73
void evaluatePrimal(Position const &start, Position const &end)
Perform a partly (forward) reevaluation of the primals in the tape. It has to hold start <= end.
T_Identifier Identifier
See PrimalEvaluationTapeInterface.
Definition primalEvaluationTapeInterface.hpp:74
Real const & primal(Identifier const &identifier) const
Read only reference to primal value.
void revertPrimals(Position const &pos)
Revert the primals to the state indicated by pos.