General interface for an arbitrary adjoint evaluation. More...
#include <customAdjointVectorHelper.hpp>
Public Types | |
using | Identifier = typename Type::Identifier |
See LhsExpressionInterface. | |
using | Position = typename Tape::Position |
See PositionalEvaluationTapeInterface. | |
using | Real = typename Type::Real |
See LhsExpressionInterface. | |
using | Tape = typename Type::Tape |
See LhsExpressionInterface. | |
using | Type = T_Type |
See CustomAdjointVectorInterface. | |
Public Member Functions | |
CustomAdjointVectorInterface () | |
Constructor. | |
virtual | ~CustomAdjointVectorInterface () |
Destructor. | |
Interface definition | |
virtual void | clearAdjoints ()=0 |
Set all adjoints to zero. | |
virtual void | deleteAdjointVector ()=0 |
Delete the adjoint vector. | |
virtual void | evaluate (Position const &start, Position const &end)=0 |
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end. | |
virtual void | evaluateForward (Position const &start, Position const &end)=0 |
Perform a forward evaluation of a part of the tape. It has to hold start <= end. | |
virtual VectorAccessInterface< Real, Identifier > * | getVectorInterface ()=0 |
Get a new general interface to the adjoint vector. | |
Common methods | |
void | evaluate () |
Perform a full reverse evaluation of the tape. | |
void | evaluateForward () |
Perform a forward evaluation of a part of the tape. It has to hold start <= end. | |
void | setTape (Tape &tape) |
Set the tape for the evaluations. | |
Protected Attributes | |
Tape & | tape |
Current tape for evaluations. Default: the Type's current tape. | |
General interface for an arbitrary adjoint evaluation.
In contrast to CustomAdjointVectorHelper this interface provides a generalization to the former class. This interface can be used if at compile time the required number of vector entries is not known.
See CustomAdjointVectorHelper for details.
Access to the adjoint vector is gained through the VectorAccessInterface.
T_Type | The underlying CoDiPack type. |
|
pure virtual |
Set all adjoints to zero.
Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.
|
pure virtual |
Delete the adjoint vector.
Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.
|
inline |
Perform a full reverse evaluation of the tape.
Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.
|
pure virtual |
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.
Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.
Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >, and codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.
|
inline |
Perform a forward evaluation of a part of the tape. It has to hold start <= end.
Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.
|
pure virtual |
Perform a forward evaluation of a part of the tape. It has to hold start <= end.
Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.
Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >, and codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.
|
pure virtual |
Get a new general interface to the adjoint vector.
Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.