Creates a pseudo active type from a data value. Can be used to overlay existing data with immutable active types. More...
#include <immutableActiveType.hpp>

Public Types | |
| using | ActiveType = T_ActiveType |
| See ImmutableActiveType. | |
| using | Base = LhsExpressionInterface<Real, Gradient, Tape, ImmutableActiveType> |
| Base class abbreviation. | |
| using | Gradient = typename Tape::Gradient |
| See LhsExpressionInterface. | |
| using | Identifier = typename Tape::Identifier |
| See LhsExpressionInterface. | |
| using | PassiveReal = RealTraits::PassiveReal<Real> |
| Basic computation type. | |
| using | Real = typename Tape::Real |
| See LhsExpressionInterface. | |
| using | Tape = typename ActiveType::Tape |
| See ActiveType. | |
| using | TapeData = typename Tape::ActiveTypeTapeData |
| See IdentifierInformationTapeInterface. | |
Implementation of ExpressionInterface | |
| using | StoreAs = ImmutableActiveType const& |
| Defines how this expression is stored in an expression tree. | |
| using | ADLogic = Tape |
| AD logic that governs the expression. Needs to be the same for all inputs of the expression. | |
Public Types inherited from codi::LhsExpressionInterface< T_ActiveType::Real, T_ActiveType::Gradient, T_ActiveType::Tape, ImmutableActiveType< T_ActiveType > > | |
| using | Base |
| Base class abbreviation. | |
| using | Gradient |
| See LhsExpressionInterface. | |
| using | Identifier |
| See GradientAccessTapeInterface. | |
| using | Impl |
| See LhsExpressionInterface. | |
| using | PassiveReal |
| Basic computation type. | |
| using | Real |
| See LhsExpressionInterface. | |
| using | Tape |
| See LhsExpressionInterface. | |
| using | TapeData |
| See IdentifierInformationTapeInterface. | |
Public Types inherited from codi::ExpressionInterface< T_ActiveType::Real, ImmutableActiveType< T_ActiveType > > | |
| using | ADLogic |
| AD logic that governs the expression. Needs to be the same for all inputs of the expression. | |
| using | Impl |
| See ExpressionInterface. | |
| using | Real |
| See ExpressionInterface. | |
| using | StoreAs |
| Defines how this expression is stored in an expression tree. | |
Public Types inherited from codi::NodeInterface< ImmutableActiveType< T_ActiveType > > | |
| using | Impl |
| See NodeInterface. | |
Public Types inherited from codi::ExpressionMemberOperations< T_ActiveType::Real, ImmutableActiveType< T_ActiveType > > | |
| using | Impl |
| See ExpressionMemberOperations. | |
| using | Real |
| See ExpressionMemberOperations. | |
Public Types inherited from codi::AssignmentOperators< T_ActiveType::Tape::Real, T_ActiveType::Tape::AllowJacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| using | Base |
| using | Impl |
| See AssignmentOperators. | |
| using | PassiveReal |
| Basic computation type. | |
| using | Real |
| See AssignmentOperators. | |
Public Types inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_ActiveType::Tape::Real, T_JacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| using | Impl |
| See AssignmentOperators. | |
| using | PassiveReal |
| Basic computation type. | |
| using | Real |
| See AssignmentOperators. | |
Public Types inherited from codi::IncrementOperators< T_ActiveType::Tape, ImmutableActiveType< T_ActiveType > > | |
| using | Impl |
| See IncrementOperators. | |
| using | PassiveReal |
| Basic computation type. | |
| using | Real |
| See InternalStatementRecordingTapeInterface. | |
| using | Tape |
| See IncrementOperators. | |
Public Member Functions | |
| inlineImmutableActiveType (ActiveType const &value) | |
| inlineImmutableActiveType (Real const &value, TapeData const &tapeData) | |
| inlineImmutableActiveType< ActiveType > & | operator= (ImmutableActiveType< ActiveType > const &v)=delete |
| This class is immutable, delete all assignment operators. | |
| inline | ~ImmutableActiveType () |
Public Member Functions inherited from codi::LhsExpressionInterface< T_ActiveType::Real, T_ActiveType::Gradient, T_ActiveType::Tape, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| LhsExpressionInterface ()=default | |
| Constructor. | |
| LhsExpressionInterface (LhsExpressionInterface const &other)=default | |
| Constructor. | |
| inlineImpl & | cast () |
| Cast to the implementation. | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| inlineGradient & | gradient () |
| Get the gradient of this lvalue from the tape. | |
| inlineGradient const & | gradient () const |
| Get the gradient of this lvalue from the tape. | |
| inlineGradient | getGradient () const |
| Get the gradient of this lvalue from the tape. | |
| inlinevoid | setGradient (Gradient const &g) |
| Set the gradient of this lvalue in the tape. | |
| inlineReal const & | getValue () const |
| Get the primal value of this lvalue. | |
| inlinevoid | setValue (Real const &v) |
| Set the primal value of this lvalue. | |
| inlineImpl & | operator= (Real const &rhs) |
| Assignment operator for passive values. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (PassiveReal const &rhs) |
| Assignment operator for passive values. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (ExpressionInterface< Real, Rhs > const &rhs) |
| Assignment operator for expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (ExpressionInterface< typename U::Real, Rhs > const &rhs) |
| Assignment operator for expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (LhsExpressionInterface const &rhs) |
| Assignment operator for lhs expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| inlineImpl & | operator= (LhsExpressionInterface< Real, Gradient, Tape, Rhs > const &rhs) |
| Assignment operator for lhs expressions. Calls store on the InternalStatementRecordingTapeInterface. | |
| Real const & | value () const |
| Get a constant reference to the lvalue represented by the expression. | |
| Real & | value () |
| Get a reference to the lvalue represented by the expression. | |
| Identifier const & | getIdentifier () const |
| Identifier & | getIdentifier () |
| TapeData const & | getTapeData () const |
| Get the data of the tape stored in this lhs expression. | |
| TapeData & | getTapeData () |
| Get the data of the tape stored in this lhs expression. | |
Public Member Functions inherited from codi::ExpressionInterface< T_ActiveType::Real, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| ExpressionInterface ()=default | |
| Constructor. | |
| ExpressionInterface (ExpressionInterface const &)=default | |
| Constructor. | |
| inlineReal const | getValue () const |
| Compute the primal value that is usually evaluated by the statement/expression. | |
| inlineauto | applyTangent (Tangent const &tangent) const |
| inlineauto | applyAdjoint (Adjoint const &adjoint) const |
Public Member Functions inherited from codi::NodeInterface< ImmutableActiveType< T_ActiveType > > | |
| inlineImpl const & | cast () const |
| Cast to the implementation. | |
| char const & | getLink () const |
| an expression. | |
Public Member Functions inherited from codi::AssignmentOperators< T_ActiveType::Tape::Real, T_ActiveType::Tape::AllowJacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl & | operator*= (ExpressionInterface< Real, Rhs > const &rhs) |
| Operator *= for expressions. | |
| inlineImpl & | operator*= (PassiveReal const &rhs) |
| Operator *= for passive values. | |
| inlineImpl & | operator+= (ExpressionInterface< Real, Rhs > const &rhs) |
| Operator += for expressions. | |
| inlineImpl & | operator+= (PassiveReal const &rhs) |
| Operator += for passive values. | |
| inlineImpl & | operator+= (PassiveReal const &rhs) |
| Operator += for passive values. | |
| inlineImpl & | operator-= (ExpressionInterface< Real, Rhs > const &rhs) |
| Operator -= for expressions. | |
| inlineImpl & | operator-= (PassiveReal const &rhs) |
| Operator -= for passive values. | |
| inlineImpl & | operator-= (PassiveReal const &rhs) |
| Operator -= for passive values. | |
| inlineImpl & | operator/= (ExpressionInterface< Real, Rhs > const &rhs) |
| Operator /= for expressions. | |
| inlineImpl & | operator/= (PassiveReal const &rhs) |
| Operator /= for passive values. | |
Public Member Functions inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_ActiveType::Tape::Real, T_JacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl & | operator+= (PassiveReal const &rhs) |
| Operator += for passive values. | |
| inlineImpl & | operator-= (PassiveReal const &rhs) |
| Operator -= for passive values. | |
Public Member Functions inherited from codi::IncrementOperators< T_ActiveType::Tape, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl & | cast () |
| Cast to the implementation. | |
| inlineImpl & | operator++ () |
| Prefix operator++. | |
| inlineImpl | operator++ (int u) |
| Postfix operator++. | |
| inlineImpl & | operator-- () |
| Prefix operator--. | |
| inlineImpl | operator-- (int u) |
| Postfix operator--. | |
Implementation of LhsExpressionInterface | |
Only the const access functions are implemented. | |
| inlineIdentifier const & | getIdentifier () const |
| inlineTapeData const & | getTapeData () const |
| Get the data of the tape stored in this lhs expression. | |
| inlineReal const & | value () const |
| Get a constant reference to the lvalue represented by the expression. | |
| static inlineTape & | getTape () |
| Get a reference to the tape which manages this expression. | |
Additional Inherited Members | |
| static Tape & | getTape () |
| Get a reference to the tape which manages this expression. | |
| static size_t constexpr | LinkCount |
| handle the expression as a leaf node. | |
| static size_t constexpr | LinkCount |
| handle the expression as a leaf node. | |
Static Public Attributes inherited from codi::AssignmentOperators< T_ActiveType::Tape::Real, T_ActiveType::Tape::AllowJacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| static bool constexpr | JacobianOptimization |
| See AssignmentOperators. | |
Static Public Attributes inherited from codi::AssignmentOperatorsPassiveJacobianOptimization< T_ActiveType::Tape::Real, T_JacobianOptimization, ImmutableActiveType< T_ActiveType > > | |
| static bool constexpr | JacobianOptimization |
| See AssignmentOperators. | |
| inlinevoid | init (Real const &newValue, EventHints::Statement statementType) |
| inlinevoid | destroy () |
Protected Member Functions inherited from codi::ExpressionMemberOperations< T_ActiveType::Real, ImmutableActiveType< T_ActiveType > > | |
| inlineImpl const & | cast () const |
| Cast to implementation. | |
Creates a pseudo active type from a data value. Can be used to overlay existing data with immutable active types.
The class stores copies to the value and identifier. The identifier is taken as it is and not initialized or destroyed. The class only wraps the data in a CoDiPack expression.
See Expression design documentation for details about the expression system in CoDiPack.
| T_ActiveType | The type of the active type which is wrapped. |
| using codi::ImmutableActiveType< T_ActiveType >::ADLogic = Tape |
AD logic that governs the expression. Needs to be the same for all inputs of the expression.
| using codi::ImmutableActiveType< T_ActiveType >::StoreAs = ImmutableActiveType const& |
Defines how this expression is stored in an expression tree.
|
inline |
The tape data is not destroyed. It is assumed to be still valid, since this is only an immutable copy of the actual value.
|
inline |
Get a constant reference to the identifier of the tape for this expression. See also Direct data access (Identifier management)
|
inlinestatic |
Get a reference to the tape which manages this expression.
|
inline |
Get the data of the tape stored in this lhs expression.
|
inline |
Create an immutable copy of an active type. It is assumed that the tape data is valid throughout the lifespan of this object.
|
inline |
The tape data is not initialized. It is assumed to be a valid tape data (either default or assigned by an expression) and has to be valid throughout the lifespan of this object.
|
inline |
Get a constant reference to the lvalue represented by the expression.