Reverse AD evaluation for parts of a recorded tape. More...
#include <positionalEvaluationTapeInterface.hpp>
Public Types | |
using | Position = T_Position |
See PositionalEvaluationTapeInterface. | |
Public Member Functions | |
Interface definition | |
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. | |
Reverse AD evaluation for parts of a recorded tape.
See Tape Interface Design for a general overview of the tape interface design in CoDiPack.
The definitions in the ReverseTapeInterface provide only methods that operate on the full tape. With the methods in this interface, all these operations can be performed on parts of the tape.
Here is an example for a positional tape evaluation (Example 3 - Positional tape evaluations):
T_Position | Global tape position, usually chosen as Tape::Position. |
void codi::PositionalEvaluationTapeInterface< T_Position >::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.
Automatic adjoints management involves locking, see AdjointsManagement for details.
void codi::PositionalEvaluationTapeInterface< T_Position >::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.
Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.
void codi::PositionalEvaluationTapeInterface< T_Position >::resetTo | ( | Position const & | pos, |
bool | resetAdjoints = true, | ||
AdjointsManagement | adjointsManagement = AdjointsManagement::Automatic ) |
Reset the tape to the provided position.
Automatic adjoints management involves locking, see AdjointsManagement for details.