39#include "../tapes/interfaces/fullTapeInterface.hpp"
40#include "../traits/realTraits.hpp"
41#include "assignmentOperators.hpp"
42#include "incrementOperators.hpp"
43#include "lhsExpressionInterface.hpp"
60 template<
typename T_Tape,
typename T_Impl>
63 public AssignmentOperators<typename T_Tape::Real, T_Tape::AllowJacobianOptimization, T_Impl>,
76 using Real =
typename Tape::Real;
80 using TapeData =
typename Tape::ActiveTypeTapeData;
93 return static_cast<Impl&
>(*this);
102 template<
typename U = Real,
typename = RealTraits::EnableIfNotPassiveReal<U>>
110 cast().getTape().store(*
this, v);
119 template<
typename Rhs>
121 Base::init(rhs.
cast().getValue(), EventHints::Statement::Expression);
122 cast().getTape().store(*
this, rhs.
cast());
126 template<
typename Rhs,
typename U = Real,
typename = RealTraits::EnableIfNotPassiveReal<U>>
128 : primalValue(rhs.
cast()), tapeData() {
129 Base::init(rhs.
cast().getValue(), EventHints::Statement::Passive);
142 using Base::operator=;
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:469
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:97
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type that was used in the application.
Definition realTraits.hpp:123
CoDiPack - Code Differentiation Package.
Definition codi.hpp:97
Represents the base implementation concrete lvalue in the CoDiPack expression tree.
Definition activeTypeBase.hpp:64
Tape ADLogic
Definition activeTypeBase.hpp:149
inlineImpl & cast()
Cast to the implementation.
Definition activeTypeBase.hpp:92
inlineTapeData const & getTapeData() const
Get the data of the tape stored in this lhs expression.
Definition activeTypeBase.hpp:172
Impl const & StoreAs
Definition activeTypeBase.hpp:148
inlineReal const & value() const
Get a constant reference to the lvalue represented by the expression.
Definition activeTypeBase.hpp:182
inlineIdentifier & getIdentifier()
Definition activeTypeBase.hpp:157
RealTraits::PassiveReal< Real > PassiveReal
Definition activeTypeBase.hpp:77
inlineTapeData & getTapeData()
Get the data of the tape stored in this lhs expression.
Definition activeTypeBase.hpp:167
inlineReal & value()
Definition activeTypeBase.hpp:177
typename Tape::Identifier Identifier
Definition activeTypeBase.hpp:78
ActiveType Impl
Definition activeTypeBase.hpp:74
typename Tape::ActiveTypeTapeData TapeData
Definition activeTypeBase.hpp:80
inlineIdentifier const & getIdentifier() const
Definition activeTypeBase.hpp:162
inlineImpl & operator=(ActiveTypeBase const &v)
See LhsExpressionInterface::operator=(LhsExpressionInterface const&).
Definition activeTypeBase.hpp:138
typename Tape::Gradient Gradient
Definition activeTypeBase.hpp:79
inline ~ActiveTypeBase()
Destructor.
Definition activeTypeBase.hpp:133
LhsExpressionInterface< Real, Gradient, T_Tape, ActiveType > Base
Definition activeTypeBase.hpp:82
typename Tape::Real Real
Definition activeTypeBase.hpp:76
T_Tape Tape
Definition activeTypeBase.hpp:71
static inlineTape & getTape()
Get a reference to the tape which manages this expression.
Definition activeType.hpp:99
Provides assignment operators for LhsExpressionInterface implementations.
Definition assignmentOperators.hpp:120
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:60
inlineImpl const & cast() const
Cast to the implementation.
Definition expressionInterface.hpp:76
Implementation of increment operators for LhsExpressionInterface implementations.
Definition incrementOperators.hpp:54
Base class for all CoDiPack lvalue expression.
Definition lhsExpressionInterface.hpp:63
LhsExpressionInterface()=default
Constructor.
inlinevoid init(Real const &newValue, EventHints::Statement statementType)
Definition lhsExpressionInterface.hpp:202
inlineReal const & getValue() const
Get the primal value of this lvalue.
Definition lhsExpressionInterface.hpp:129
inlinevoid destroy()
Definition lhsExpressionInterface.hpp:211