General information about the identifiers and checks if variables are active. More...
#include <identifierInformationTapeInterface.hpp>
Public Types | |
using | Gradient = T_Gradient |
See IdentifierInformationTapeInterface. | |
using | Identifier = T_Identifier |
See IdentifierInformationTapeInterface. | |
using | Real = T_Real |
See IdentifierInformationTapeInterface. | |
Interface definition | |
static bool constexpr | LinearIndexHandling = false |
Identifier | getPassiveIndex () const |
Identifier for passive values. Usually 0. | |
Identifier | getInvalidIndex () const |
Invalid identifier. | |
bool | isIdentifierActive (Identifier const &index) const |
template<typename Lhs , typename Tape > | |
void | deactivateValue (LhsExpressionInterface< Real, Gradient, Tape, Lhs > &value) |
General information about the identifiers and checks if variables are active.
See Tape Interface Design for a general overview of the tape interface design in CoDiPack.
With this interface, the user can check if a variable in the program is active or not. For an explanation of what is an active variable for CoDiPack, please see Online activity analysis.
Here is an example for deactivating an identifier (documentation/examples/identifierInformationTapeInterface.cpp):
T_Real | The computation type of a tape, usually chosen as ActiveType::Real. |
T_Gradient | The gradient type of a tape, usually chosen as ActiveType::Gradient. |
T_Identifier | The adjoint/tangent identification type of a tape, usually chosen as ActiveType::Identifier. |
void codi::IdentifierInformationTapeInterface< T_Real, T_Gradient, T_Identifier >::deactivateValue | ( | LhsExpressionInterface< Real, Gradient, Tape, Lhs > & | value | ) |
Modify the value such that it is no longer active.
Lhs | Class that implements the LhsExpressionInterface. See also LhsExpressionInterface. |
Tape | Tape implementation used in the LhsExpressionInterface. See also LhsExpressionInterface. |
bool codi::IdentifierInformationTapeInterface< T_Real, T_Gradient, T_Identifier >::isIdentifierActive | ( | Identifier const & | index | ) | const |
True if the identifier is considered active by the tape.
|
staticconstexpr |
True if the tape uses an index handler that provides identifiers in a monotonically increasing way (see LinearIndexManager).