Allows user defined vectors for the forward and adjoint evaluation. More...
#include <customAdjointVectorEvaluationTapeInterface.hpp>
Public Types | |
using | Position = T_Position |
See CustomAdjointVectorEvaluationTapeInterface. | |
Public Types inherited from codi::ForwardEvaluationTapeInterface< T_Position > | |
using | Position = T_Position |
See ForwardEvaluationTapeInterface. | |
Public Types inherited from codi::PositionalEvaluationTapeInterface< T_Position > | |
using | Position = T_Position |
See PositionalEvaluationTapeInterface. | |
Public Member Functions | |
Interface definition | |
template<typename Adjoint > | |
void | evaluate (Position const &start, Position const &end, Adjoint *data) |
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end. | |
template<typename Adjoint > | |
void | evaluateForward (Position const &start, Position const &end, Adjoint *data) |
Perform a forward evaluation of a part of the tape. It has to hold start <= end. | |
Public Member Functions inherited from codi::ForwardEvaluationTapeInterface< T_Position > | |
void | evaluateForward (Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
Perform a forward evaluation of a part of the tape. It has to hold start <= end. | |
void | evaluateForward (AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
Perform a forward evaluation of the full tape. | |
Public Member Functions inherited from codi::PositionalEvaluationTapeInterface< T_Position > | |
void | evaluate (Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
Perform a reverse evaluation for a part of the tape. It hast to hold start >= end. | |
void | clearAdjoints (Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
Clear all adjoints that would be set in a tape evaluation from start to end. It has to hold start >= end. | |
Position | getPosition () const |
Current position of the tape. | |
Position | getZeroPosition () const |
Initial position of the tape. | |
void | resetTo (Position const &pos, bool resetAdjoints=true, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
Reset the tape to the provided position. | |
Allows user defined vectors for the forward and adjoint evaluation.
See Tape Interface Design for a general overview of the tape interface design in CoDiPack.
The two additional evaluate methods allow for the evaluation of the tape with a custom adjoint vector. The type of the vector must support the following operators:
Here is an example for an evaluation with a custom adjoint vector (documentation/examples/customAdjointVectorEvaluationTapeInterface.cpp):
T_Position | Global tape position, usually chosen as Tape::Position. |
void codi::CustomAdjointVectorEvaluationTapeInterface< T_Position >::evaluate | ( | Position const & | start, |
Position const & | end, | ||
Adjoint * | data ) |
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.
Adjoint | See CustomAdjointVectorEvaluationTapeInterface documentation. |
void codi::CustomAdjointVectorEvaluationTapeInterface< T_Position >::evaluateForward | ( | Position const & | start, |
Position const & | end, | ||
Adjoint * | data ) |
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.
Adjoint | See CustomAdjointVectorEvaluationTapeInterface documentation. |