Tape for tagging variables and find errors in the AD workflow. More...
#include <tagTapeReverse.hpp>

Classes | |
| struct | TapeTypes |
| Required definition for event system. More... | |
Public Member Functions | |
| void | destroyTapeData (Real &value, ActiveTypeTapeData &data) |
| Do nothing. | |
| inlineIdentifier & | getIdentifier (ActiveTypeTapeData &data) |
| inlineIdentifier const & | getIdentifier (ActiveTypeTapeData const &data) |
| void | initTapeData (Real &value, ActiveTypeTapeData &data) |
| Do nothing. | |
| inlinevoid | store (AggregatedActiveType< Aggregated, Type, Lhs > &lhs, AggregatedActiveType< Aggregated, Type, Rhs > const &rhs) |
| Has to be called by an AD variable every time it is assigned. | |
| inlinevoid | store (AggregatedActiveType< Aggregated, Type, Lhs > &lhs, ExpressionInterface< Aggregated, Rhs > const &rhs) |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, ExpressionInterface< Real, Rhs > const &rhs) |
| Verify all tags of the rhs and the lhs properties. | |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, LhsExpressionInterface< Real, Gradient, Impl, Rhs > const &rhs) |
| Verify all tags of the rhs and the lhs properties. | |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, Real const &rhs) |
| Verify the lhs properties. | |
| TagTapeReverse () | |
| Constructor. | |
CustomAdjointVectorEvaluationTapeInterface interface implementation | |
| template<typename Adjoint> | |
| void | evaluate (Position const &start, Position const &end, Adjoint *data) |
| Do nothing. | |
| template<typename Adjoint> | |
| void | evaluateForward (Position const &start, Position const &end, Adjoint *data) |
| Do nothing. | |
DataManagementTapeInterface interface implementation | |
| void | writeToFile (std::string const &filename) const |
| Do nothing. | |
| void | readFromFile (std::string const &filename) |
| Do nothing. | |
| void | deleteData () |
| Do nothing. | |
| std::set< TapeParameters > const & | getAvailableParameters () const |
| Empty set. | |
| size_t | getParameter (TapeParameters parameter) const |
| Do nothing. | |
| bool | hasParameter (TapeParameters parameter) const |
| Do nothing. | |
| void | setParameter (TapeParameters parameter, size_t value) |
| Do nothing. | |
| VectorAccessInterface< Real, Identifier > * | createVectorAccess () |
| Do nothing. | |
| template<typename Adjoint> | |
| VectorAccessInterface< Real, Identifier > * | createVectorAccessCustomAdjoints (Adjoint *data) |
| Do nothing. | |
| void | deleteVectorAccess (VectorAccessInterface< Real, Identifier > *access) |
| Do nothing. | |
| void | swap (TagTapeReverse &other) |
| Swap members. | |
| void | resetHard () |
| Do nothing. | |
| void | deleteAdjointVector () |
| Do nothing. | |
| void | resizeAdjointVector () |
| Do nothing. | |
| void | beginUseAdjointVector () |
| Do nothing. | |
| void | endUseAdjointVector () |
| Do nothing. | |
ExternalFunctionTapeInterface interface implementation | |
| template<typename Lhs> | |
| Real | registerExternalFunctionOutput (LhsExpressionInterface< Real, Gradient, TagTapeReverse, Lhs > &value) |
| Verifies tag properties. | |
| void | pushExternalFunction (ExternalFunction< TagTapeReverse > const &extFunc) |
| Do nothing. | |
ForwardEvaluationTapeInterface interface implementation | |
| void | evaluateForward (Position const &start, Position const &end) |
| Do nothing. | |
| void | evaluateForward () |
| Do nothing. | |
GradientAccessTapeInterface interface implementation | |
| void | setGradient (Identifier const &identifier, Gradient const &gradient, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Verify tag. | |
| Gradient const & | getGradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) const |
| Verify tag. | |
| Gradient & | gradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Verify tag. | |
| Gradient const & | gradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) const |
| Verify tag. | |
ManualStatementPushTapeInterface interface implementation | |
| void | pushJacobiManual (Real const &jacobian, Real const &value, ActiveTypeTapeData const &index) |
| Do nothing. | |
| void | storeManual (Real const &lhsValue, ActiveTypeTapeData &lhsIndex, Config::ArgumentSize const &size) |
| Set tag on lhs. | |
PositionalEvaluationTapeInterface interface implementation | |
| void | evaluate (Position const &start, Position const &end) |
| Do nothing. | |
| void | clearAdjoints (Position const &start, Position const &end) |
| Do nothing. | |
| Position | getPosition () const |
| Do nothing. | |
| Position | getZeroPosition () const |
| Do nothing. | |
| void | resetTo (Position const &pos, bool resetAdjoints=true) |
| Do nothing. | |
PreaccumulationEvaluationTapeInterface interface implementation | |
| void | evaluateKeepState (Position const &start, Position const &end) |
| Do nothing. | |
| void | evaluateForwardKeepState (Position const &start, Position const &end) |
| Do nothing. | |
ReverseTapeInterface interface implementation | |
| template<typename Lhs> | |
| void | registerInput (LhsExpressionInterface< Real, Gradient, TagTapeReverse, Lhs > &value) |
| Verify value properties. | |
| template<typename Lhs> | |
| void | registerOutput (LhsExpressionInterface< Real, Gradient, TagTapeReverse, Lhs > &value) |
| Verify tag. | |
| void | setActive () |
| Set tape to active. | |
| void | setPassive () |
| Set tape to passive. | |
| bool | isActive () const |
| Check if tape is active. | |
| bool | isActive (Identifier const &identifier) const |
| Default check. | |
| void | evaluate () |
| Do nothing. | |
| void | clearAdjoints () |
| Do nothing. | |
| void | reset (bool resetAdjoints=true) |
| Do nothing. | |
| template<typename Stream = std::ostream> | |
| void | printStatistics (Stream &out=std::cout) const |
| Do nothing. | |
| template<typename Stream = std::ostream> | |
| void | printTableHeader (Stream &out=std::cout) const |
| Do nothing. | |
| template<typename Stream = std::ostream> | |
| void | printTableRow (Stream &out=std::cout) const |
| Do nothing. | |
| TapeValues | getTapeValues () const |
| Do nothing. | |
Public Member Functions inherited from codi::CustomAdjointVectorEvaluationTapeInterface< EmptyPosition > | |
| void | evaluate (Position const &start, Position const &end, AdjointVector &&data) |
| Perform a reverse evaluation for a part of the tape. It hast to hold start >= end. | |
| void | evaluateForward (Position const &start, Position const &end, AdjointVector &&data) |
| Perform a forward evaluation of a part of the tape. It has to hold start <= end. | |
| void | clearCustomAdjoints (Position const &start, Position const &end, AdjointVector &&data) |
| Clear all adjoint values, that is, set them to zero. | |
| InternalAdjoints | getInternalAdjoints () |
| Obtain a representation of the tape's internal adjoint vector that can be used as custom adjoints. | |
Public Member Functions inherited from codi::ForwardEvaluationTapeInterface< EmptyPosition > | |
| 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< EmptyPosition > | |
| 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. | |
Public Member Functions inherited from codi::CustomIteratorTapeInterface< EmptyPosition > | |
| void | iterateForward (Callbacks &&callbacks, Position const &start, Position const &end) |
| Iterate over the tape in a generalized fashion. callbacks needs to implement codi::CallbacksInterface. | |
| void | iterateForward (Callbacks &&callbacks) |
| Iterate over the tape in a generalized fashion. callbacks needs to implement codi::CallbacksInterface. | |
| void | iterateReverse (Callbacks &&callbacks, Position const &start, Position const &end) |
| Iterate over the tape in a generalized fashion. callbacks needs to implement codi::CallbacksInterface. | |
| void | iterateReverse (Callbacks &&callbacks) |
| Iterate over the tape in a generalized fashion. callbacks needs to implement codi::CallbacksInterface. | |
Public Member Functions inherited from codi::DataManagementTapeInterface< T_Real, TagData< T_Tag > > | |
| void | writeToFile (std::string const &filename) const |
| See File IO functions. | |
| void | readFromFile (std::string const &filename) |
| See File IO functions. | |
| void | deleteData () |
| See File IO functions. | |
| std::set< TapeParameters > const & | getAvailableParameters () const |
| See Parameters functions. | |
| size_t | getParameter (TapeParameters parameter) const |
| See Parameters functions. | |
| bool | hasParameter (TapeParameters parameter) const |
| See Parameters functions. | |
| void | setParameter (TapeParameters parameter, size_t value) |
| See Parameters functions. | |
| VectorAccessInterface< Real, Identifier > * | createVectorAccess () |
| See Adjoint vector access. | |
| VectorAccessInterface< Real, Identifier > * | createVectorAccessCustomAdjoints (AdjointVector &&data) |
| void | deleteVectorAccess (VectorAccessInterface< Real, Identifier > *access) |
| See Adjoint vector access. | |
| void | resizeAdjointVector () |
| Explicitly trigger resizing of the adjoint vector. See Adjoint vector management. | |
| void | deleteAdjointVector () |
| Delete the adjoint vector. See Adjoint vector management. | |
| void | beginUseAdjointVector () |
| Declare that the adjoint vector is being used. See Adjoint vector management. | |
| void | endUseAdjointVector () |
| Declare that the adjoint vector is no longer used. See Adjoint vector management. | |
| void | swap (DataManagementTapeInterface &other) |
| Swap all data with an other tape. | |
| void | resetHard () |
| Delete everything and return to the state after construction, as far as possible. | |
Public Member Functions inherited from codi::ExternalFunctionTapeInterface< T_Real, T_Real, TagData< T_Tag > > | |
| Real | registerExternalFunctionOutput (LhsExpressionInterface< Real, Gradient, Tape, Lhs > &value) |
| void | pushExternalFunction (ExternalFunction< ExternalFunctionTapeInterface > const &extFunc) |
Public Member Functions inherited from codi::GradientAccessTapeInterface< T_Real, TagData< T_Tag > > | |
| void | setGradient (Identifier const &identifier, Gradient const &gradient, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Set the gradient. | |
| Gradient const & | getGradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) const |
| Set the gradient. | |
| Gradient & | gradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Reference access to gradient. | |
| Gradient const & | gradient (Identifier const &identifier, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) const |
| Constant reference access to gradient. | |
| Identifier | getPassiveIndex () const |
| Identifier for passive values. Usually 0. | |
| Identifier | getInvalidIndex () const |
| Invalid identifier. | |
| bool | isIdentifierActive (Identifier const &index) const |
| IndexManagerInterface< Identifier > & | getIndexManager () |
| Returns a reference to the Index Manager. | |
| Identifier | getIdentifier (ActiveTypeTapeData const &data) |
| Identifier & | getIdentifier (ActiveTypeTapeData &data) |
| void | deactivateValue (LhsExpressionInterface< Real, Gradient, Tape, Lhs > &value) |
| void | initTapeData (Real &value, ActiveTypeTapeData &data) |
| < Has to be called for each tape data, after it is allocated. | |
| void | destroyTapeData (Real &value, ActiveTypeTapeData &data) |
| Has to be called for each tape data, before it is deallocated. | |
| void | store (Lhs &lhs, Rhs const &rhs) |
| Has to be called by an AD variable every time it is assigned. | |
| TemporaryMemory & | getTemporaryMemory () |
| Temporary memory that can be used for dynamic data both during the evaluation and the recording. | |
| void | pushLowLevelFunction (Config::LowLevelFunctionToken token, size_t size, ByteDataView &data) |
| Push a low level function to the tape. | |
| Config::LowLevelFunctionToken | registerLowLevelFunction (LowLevelFunctionEntry< LowLevelFunctionTapeInterface, Real, Identifier > const &entry) |
| Register a low level function on the tape. | |
Public Member Functions inherited from codi::ManualStatementPushTapeInterface< T_Real, T_Real, TagData< T_Tag > > | |
| void | pushJacobianManual (Real const &jacobian, Real const &value, ActiveTypeTapeData const &data) |
| void | storeManual (Real const &lhsValue, ActiveTypeTapeData &lhsData, Config::ArgumentSize const &size) |
Public Member Functions inherited from codi::PreaccumulationEvaluationTapeInterface< T_Real, T_Real, EmptyPosition, TagData< T_Tag > > | |
| void | evaluateKeepState (Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Perform a tape evaluation but restore the state afterwards such that it is the same as when the evaluation started. It hast to hold start >= end. | |
| void | evaluateKeepState (Position const &start, Position const &end, AdjointVector &&data) |
| Perform a tape evaluation but restore the state afterwards such that it is the same as when the evaluation started. It hast to hold start >= end. | |
| void | evaluateForwardKeepState (Position const &start, Position const &end, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Perform a tape evaluation but restore the state afterwards such that it is the same as when the evaluation started. It hast to hold start <= end. | |
| void | evaluateForwardKeepState (Position const &start, Position const &end, AdjointVector &&data) |
| Perform a tape evaluation but restore the state afterwards such that it is the same as when the evaluation started. It hast to hold start <= end. | |
| 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. | |
| void | evaluatePrimal () |
| Perform a full (forward) reevaluation of the primals in the tape. | |
| void | setPrimal (Identifier const &identifier, Real const &gradient) |
| Set primal value. | |
| Real const & | getPrimal (Identifier const &identifier) const |
| Get primal value. | |
| Real & | primal (Identifier const &identifier) |
| Writable reference to primal value. | |
| 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. | |
| Real * | getPrimalVector () |
| Get the pointer to the internal primal value vector. | |
Public Member Functions inherited from codi::ReadWriteTapeInterface< T_Real, T_Real, TagData< T_Tag >, EmptyPosition > | |
| void | writeTape (WriterInterfaceUniquePtr writer) |
| For full-tape writers using a smart pointer. | |
| void | writeTape (WriterInterfaceUniquePtr writer, Position const &start, Position const &end) |
| For partial-tape writers using a smart pointer. | |
| void | writeTape (WriterInterface &writeToFileRef) |
| For full-tape writers using a manually generated writers. | |
| void | writeTape (WriterInterface &writeToFileRef, Position const &start, Position const &end) |
| For partial-tape writers using a manually generated writers. | |
| void | writeTape (WriterInterface *writer, Position const &start, Position const &end) |
| For full or partial tapes using a pointer to the writer. | |
| void | createStatementManual (Real const &lhsValue, Identifier &lhsIndex, Config::ArgumentSize const &size, Real const *jacobians, Identifier const *rhsIdentifiers) |
| void | createStatementManual (Identifier const &lhsIndex, Real const &lhsValue, Config::ArgumentSize const &nActiveValues, Identifier const *const rhsIdentifiers, Config::ArgumentSize const &nPassiveValues, Real const *const rhsPrimals, Config::ArgumentSize const &nConstants, Real const *const rhsConstant, EvalHandle const &evalHandle) |
Public Member Functions inherited from codi::ReverseTapeInterface< T_Real, T_Real, TagData< T_Tag > > | |
| void | registerInput (LhsExpressionInterface< Real, Gradient, Tape, Lhs > &value) |
| void | registerOutput (LhsExpressionInterface< Real, Gradient, Tape, Lhs > &value) |
| void | setActive () |
| Start/continue recording of statements. | |
| void | setPassive () |
| Stop/interrupt recording of statements. | |
| bool | isActive () const |
| Check if the tape is recording. | |
| void | evaluate (AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Perform a full reverse evaluation of the tape. | |
| void | clearAdjoints (AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Clear all adjoint values, that is, set them to zero. | |
| void | reset (bool resetAdjoints=true, AdjointsManagement adjointsManagement=AdjointsManagement::Automatic) |
| Reset the tape to the initial state for a fresh recording. | |
| void | printStatistics (Stream &out=std::cout) const |
| Default formatting of TapeValues. | |
| void | printTableHeader (Stream &out=std::cout) const |
| Table header output of TapeValues. | |
| void | printTableRow (Stream &out=std::cout) const |
| Table row output of TapeValues. | |
| TapeValues | getTapeValues () const |
| Get current tape values. | |
Public Member Functions inherited from codi::TagTapeBase< T_Real, T_Tag, T_Real, TagTapeReverse< T_Real, T_Tag > > | |
| void | swap (Impl &other) |
| Swap members. | |
| TagTapeBase () | |
| Constructor. | |
| inlineIdentifier const & | getIdentifier (ActiveTypeTapeData const &data) |
| inlineIdentifier & | getIdentifier (ActiveTypeTapeData &data) |
| void | initTapeData (Real &value, ActiveTypeTapeData &data) |
| Do nothing. | |
| void | destroyTapeData (Real &value, ActiveTypeTapeData &data) |
| Do nothing. | |
| inlinevoid | store (AggregatedActiveType< Aggregated, Type, Lhs > &lhs, ExpressionInterface< Aggregated, Rhs > const &rhs) |
| inlinevoid | store (AggregatedActiveType< Aggregated, Type, Lhs > &lhs, AggregatedActiveType< Aggregated, Type, Rhs > const &rhs) |
| Has to be called by an AD variable every time it is assigned. | |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, ExpressionInterface< Real, Rhs > const &rhs) |
| Verify all tags of the rhs and the lhs properties. | |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, LhsExpressionInterface< Real, Gradient, Impl, Rhs > const &rhs) |
| Verify all tags of the rhs and the lhs properties. | |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, Real const &rhs) |
| Verify the lhs properties. | |
| void | setCurTag (const Tag &tag) |
| Set the current tag of the tape. | |
| Tag | getCurTag () |
| Get the current tag of the tape. | |
| Tag | getTagFromVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| Get tag of a CoDiPack active type. | |
| void | setTagOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > const &value) |
| Set tag on a CoDiPack active type. | |
| void | clearTagOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| Clear tag on a CoDiPack active type. | |
| void | clearTagPropertiesOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| Clear properties on a CoDiPack active type. | |
| void | setTagPropertyOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value, TagFlags flag) |
| Set properties on a CoDiPack active type. | |
| bool | hasTagPropertyOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value, TagFlags flag) |
| Check properties on a CoDiPack active type. | |
| void | setTagPropertyErrorCallback (TagPropertyErrorCallback const &callback, void *userData) |
| Set the callback and user data for a property error error. | |
| void | setTagErrorCallback (TagErrorCallback const &callback, void *userData) |
| Set the callback and user data for a tag error. | |
| inlinevoid | setPreaccumulationHandlingEnabled (bool enabled) |
| Enable or disable specialized handling for preaccumulation. Default: true Uses a special tag to sanitize preaccumulation regions. | |
| inlinevoid | setPreaccumulationHandlingTag (Tag tag) |
| Set the special tag for preaccumulation regions. See setPreaccumulationHandlingEnabled(). | |
| inlinebool | isPreaccumulationHandlingEnabled () |
| If handling for preaccumulation is enabled. | |
| inlineTag | getPreaccumulationHandlingTag () |
| The special tag for preaccumulation. | |
Static Public Attributes | |
| static bool constexpr | AllowJacobianOptimization |
| Do not allow Jacobian optimization. | |
| static bool constexpr | LinearIndexHandling |
| static bool constexpr | AllowJacobianOptimization |
| If certain operations can be hidden from the tape. | |
| static bool constexpr | HasPrimalValues |
| True if the tape has primal values. | |
| static bool constexpr | RequiresPrimalRestore |
| True if the primal state changes during a reverse or forward evaluation. | |
Static Public Attributes inherited from codi::TagTapeBase< T_Real, T_Tag, T_Real, TagTapeReverse< T_Real, T_Tag > > | |
| static Tag constexpr | InvalidTag |
| Tag indicating an invalid value. | |
| static Tag constexpr | PassiveTag |
| Tag indicating an inactive value. | |
| static bool constexpr | AllowJacobianOptimization |
| Do not allow Jacobian optimization. | |
IdentifierInformationTapeInterface interface implementation | |
| static bool constexpr | LinearIndexHandling = true |
| Behave as linear index handler. | |
| Identifier | getPassiveIndex () const |
| Zero id. | |
| Identifier | getInvalidIndex () const |
| -1 id. | |
| bool | isIdentifierActive (Identifier const &index) const |
| Verify tag. | |
| template<typename Lhs> | |
| void | deactivateValue (LhsExpressionInterface< Real, Gradient, TagTapeReverse, Lhs > &value) |
| Set tag to passive. | |
PrimalEvaluationTapeInterface interface implementation | |
| static bool constexpr | HasPrimalValues = false |
| No primal values. | |
| static bool constexpr | RequiresPrimalRestore = false |
| No primal values. | |
| void | evaluatePrimal (Position const &start, Position const &end) |
| Do nothing. | |
| void | evaluatePrimal () |
| Do nothing. | |
| void | setPrimal (Identifier const &identifier, Real const &gradient) |
| Do nothing. | |
| Real const & | getPrimal (Identifier const &identifier) const |
| Do nothing. | |
| Real & | primal (Identifier const &identifier) |
| Do nothing. | |
| Real const & | primal (Identifier const &identifier) const |
| Do nothing. | |
| void | revertPrimals (Position const &pos) |
| Do nothing. | |
Additional Inherited Members | |
| static void | callLowLevelFunction (LowLevelFunctionTapeInterface &tape, bool forward, size_t &curLLFByteDataPos, char *dataPtr, size_t &curLLFInfoDataPos, Config::LowLevelFunctionToken *const tokenPtr, Config::LowLevelFunctionDataSize *const dataSizePtr, Args &&... args) |
| Internal function for evaluating a low level function entry. | |
| static void | skipLowLevelFunction (bool forward, size_t &curLLFByteDataPos, char *dataPtr, size_t &curLLFTInfoDataPos, Config::LowLevelFunctionToken *const tokenPtr, Config::LowLevelFunctionDataSize *const dataSizePtr) |
| Skip the data for a low level function. | |
| inlinevoid | verifyTag (ValidationIndicator< Real, Tag > &vi, Tag const &tag) const |
| Checks if the tag is correct. Errors are set on the ValidationIndicator object. | |
| inlinevoid | verifyTag (Tag const &tag) const |
| Checks if the tag is correct and creates an error. | |
| inlinevoid | verifyProperties (ValidationIndicator< Real, Tag > &vi, Real const &value, const EnumBitset< TagFlags > &properties) const |
| Checks if the tag properties are correct. | |
| inlinevoid | verifyTagAndProperties (Tag const &tag, Real const &value, const EnumBitset< TagFlags > &properties) const |
| Checks if the tag and the properties are correct. | |
| inlinevoid | checkLhsError (Real &lhsValue, ActiveTypeTapeData &lhsData, const Real &rhs) const |
| Check if a property for the lhs value is triggered. | |
| inlinevoid | checkLhsError (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, Real const &rhs) const |
| Check if the lhs value is changed. | |
| inlinevoid | handleError (ValidationIndicator< Real, Tag > &vi) const |
| Call tag error callback. | |
| inlinevoid | verifyRegisterValue (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value, ActiveTypeTapeData const &tag) |
| Verify tag, properties and lhs error. | |
| inlinevoid | setTag (Tag &tag) const |
| Set tag on value. | |
| inlinevoid | resetTag (Tag &tag) const |
| Reset tag on value. | |
| static void | defaultPropertyErrorCallback (Real const ¤tValue, Real const &newValue, TagFlags flag, void *userData) |
| Default callback for TagPropertyErrorCallback. | |
| static void | defaultTagErrorCallback (Tag const &correctTag, Tag const &wrongTag, void *userData) |
| Default callback for TagErrorCallback. | |
Protected Attributes inherited from codi::TagTapeBase< T_Real, T_Tag, T_Real, TagTapeReverse< T_Real, T_Tag > > | |
| Identifier const | activeIdentifier |
| Temporary for active identifier. | |
| Tag | curTag |
| Current tag for new values. | |
| Identifier const | passiveIdentifier |
| Temporary for passive identifier. | |
| bool | preaccumulationHandling |
| Parameter to enable/disable preaccumulation handling. | |
| Tag | preaccumulationTag |
| Tag used for preaccumulation specialized handling. | |
| TagErrorCallback | tagErrorCallback |
| User defined callback for tag errors. | |
| void * | tagErrorUserData |
| User data in call to callback for tag errors. | |
| TagPropertyErrorCallback | tagPropertyErrorCallback |
| User defined callback for lhs value errors. | |
| void * | tagPropertyErrorUserData |
| User data in call to callback for lhs value errors. | |
| Identifier | tempIdentifier |
| Temporary for identifier values. | |
Tape for tagging variables and find errors in the AD workflow.
Mimics a CoDiPack reverse tape.
See TagTapeBase for detailed information and functionality.
| T_Real | The computation type of a tape, usually chosen as ActiveType::Real. |
| T_tag | The type of the tag, usually int. |
|
inline |
Extract identifier from the tape data stored in the active type.
|
inline |
Extract identifier from the tape data stored in the active type.
|
inline |
Has to be called by an AD variable every time it is assigned.
Update of the value is performed by the tape. The tape will additionally store information, e.g., for the reversal of the statement.
| Lhs | Has to implement LhsExpressionInterface. |
| Rhs | Has to implement ExpressionInterface. Optimization for copy statements of aggregated types. |