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;
92 return static_cast<Impl&
>(*this);
101 template<
typename U = Real,
typename = RealTraits::EnableIfNotPassiveReal<U>>
109 cast().getTape().store(*
this, v);
118 template<
typename Rhs>
120 Base::init(rhs.
cast().getValue(), EventHints::Statement::Expression);
121 cast().getTape().store(*
this, rhs.
cast());
125 template<
typename Rhs,
typename U = Real,
typename = RealTraits::EnableIfNotPassiveReal<U>>
127 : primalValue(rhs.
cast()), identifier() {
128 Base::init(rhs.
cast().getValue(), EventHints::Statement::Passive);
141 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:96
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:94
Represents the base implementation concrete lvalue in the CoDiPack expression tree.
Definition activeTypeBase.hpp:64
Tape ADLogic
Definition activeTypeBase.hpp:148
inlineImpl & cast()
Cast to the implementation.
Definition activeTypeBase.hpp:91
Impl const & StoreAs
Definition activeTypeBase.hpp:147
inlineReal const & value() const
Get a constant reference to the lvalue represented by the expression.
Definition activeTypeBase.hpp:171
inlineIdentifier & getIdentifier()
Definition activeTypeBase.hpp:156
RealTraits::PassiveReal< Real > PassiveReal
Definition activeTypeBase.hpp:77
inlineReal & value()
Definition activeTypeBase.hpp:166
typename Tape::Identifier Identifier
Definition activeTypeBase.hpp:78
ActiveType Impl
Definition activeTypeBase.hpp:74
inlineIdentifier const & getIdentifier() const
Definition activeTypeBase.hpp:161
inlineImpl & operator=(ActiveTypeBase const &v)
See LhsExpressionInterface::operator=(LhsExpressionInterface const&).
Definition activeTypeBase.hpp:137
typename Tape::Gradient Gradient
Definition activeTypeBase.hpp:79
inline ~ActiveTypeBase()
Destructor.
Definition activeTypeBase.hpp:132
LhsExpressionInterface< Real, Gradient, T_Tape, ActiveType > Base
Definition activeTypeBase.hpp:81
typename Tape::Real Real
Definition activeTypeBase.hpp:76
T_Tape Tape
Definition activeTypeBase.hpp:71
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:198
inlineReal const & getValue() const
Get the primal value of this lvalue.
Definition lhsExpressionInterface.hpp:125
inlinevoid destroy()
Definition lhsExpressionInterface.hpp:207