|
|
Identifier const | activeIdentifier = 1 |
| | Temporary for active identifier.
|
|
Tag | curTag |
| | Current tag for new values.
|
|
bool | doActivityAnalysis = true |
| | Perform activity analysis for tags.
|
|
ErrorCallback | errorCallback |
| | User defined callback for tag and property errors. Has priority over the other callbacks.
|
|
void * | errorUserData |
| | User data in call to callback for errors.
|
|
Identifier const | passiveIdentifier = 0 |
| | 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 = 0 |
| | Temporary for identifier values.
|
|
ValidationIndicator< Real, Tag > | vi = {} |
| | Helper for error detection.
|
|
|
static bool constexpr | AllowJacobianOptimization = false |
| | Do not allow Jacobian optimization.
|
|
template<typename Real> |
| void | initTapeData (Real &value, ActiveTypeTapeData &data) |
| | Do nothing.
|
|
template<typename Real> |
| void | destroyTapeData (Real &value, ActiveTypeTapeData &data) |
| | Do nothing.
|
|
template<typename Aggregated, typename Type, typename Lhs, typename Rhs> |
| inlinevoid | store (AggregatedActiveType< Aggregated, Type, Lhs > &lhs, ExpressionInterface< Aggregated, Rhs > const &rhs) |
| | Verify all tags of the rhs and properties from the lhs and rhs.
|
| template<typename Aggregated, typename Type, typename Lhs, typename 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.
|
|
template<typename Lhs, typename Rhs> |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, ExpressionInterface< Real, Rhs > const &rhs) |
| | Verify all tags of the rhs and properties from the lhs and rhs.
|
|
template<typename Lhs, typename Rhs> |
| 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.
|
|
template<typename Lhs> |
| void | store (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &lhs, Real const &rhs) |
| | Verify the lhs properties.
|
|
|
void | setDoActivityAnalysis (bool active) |
| | Enable or disable the activity analysis for the tags. Disabling will mark all active types with the current tag.
|
|
void | setCurTag (const Tag &tag) |
| | Set the current tag of the tape.
|
|
Tag | getCurTag () |
| | Get the current tag of the tape.
|
|
template<typename Lhs> |
| Tag | getTagFromVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| | Get tag of a CoDiPack active type.
|
|
template<typename Lhs> |
| void | setTagOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > const &value) |
| | Set tag on a CoDiPack active type.
|
|
template<typename Lhs> |
| void | clearTagOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| | Clear tag on a CoDiPack active type.
|
|
template<typename Lhs> |
| void | clearTagPropertiesOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| | Clear properties on a CoDiPack active type.
|
|
template<typename Lhs> |
| void | setTagPropertyOnVariable (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value, TagFlags flag) |
| | Set properties on a CoDiPack active type.
|
|
template<typename Lhs> |
| 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.
|
| void | setErrorCallback (ErrorCallback const &callback, void *userData) |
|
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.
|
|
ValidationEntry< Real, Tag > | makeTagError (Tag tag, Real const *value) |
| | Create a tag error entry.
|
|
ValidationEntry< Real, Tag > | makeProeprtyError (TagFlags flag, Real const *value, Real newValue={}) |
| | Create a property error entry.
|
|
void | updateLhsTagData (ActiveTypeTapeData &lhsData, bool isActive) const |
| | Update the tag data for a lhs write. Updates the properties and sets the tag based on the activity.
|
|
void | verifyRhsAccess (Real const &value, ActiveTypeTapeData const &data, ValidationIndicator< Real, Tag > &vi) |
| | Check tag and property errors.
|
|
void | verifyRhsAccessForTag (Real const &value, ActiveTypeTapeData const &data, ValidationIndicator< Real, Tag > &vi) |
| | Check tag errors. Raises an error for tags that are not equal to the current tag. Ignores passive tags.
|
|
void | verifyRhsAccessForProperty (Real const &value, ActiveTypeTapeData const &data, ValidationIndicator< Real, Tag > &vi) |
| | Check properties for rhs values. Validates the 'DoNotUse' property.
|
|
inlinevoid | verifyLhsWrite (Real const &lhsValue, ActiveTypeTapeData const &lhsData, Real const &rhsValue, ValidationIndicator< Real, Tag > &vi) |
| | Validates the lhs properties.
|
|
template<typename Lhs> |
| inlinevoid | verifyRegisterValue (LhsExpressionInterface< Real, Gradient, Impl, Lhs > &value) |
| | Verify tag, properties and lhs error.
|
|
inlinevoid | handleError (ValidationIndicator< Real, Tag > &vi) const |
| | Call tag error callback.
|
|
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.
|
|
static void | defaultErrorCallback (ValidationEntry< Real, Tag > const &data, Tag const &curTag, void *userData) |
| | Default callback for ErrorCallback. (Currently not used)
|
template<typename T_Real, typename T_Tag, typename T_Gradient, typename T_Impl>
struct codi::TagTapeBase< T_Real, T_Tag, T_Gradient, T_Impl >
Base implementation for tagging tapes.
Provides all basic management routines for the tag.
See tests/functional/src/testTagging.cpp for an example.
- Template Parameters
-
| T_Real | The computation type of a tape, usually chosen as ActiveType::Real. |
| T_tag | The type of the tag, usually int. |