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>
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:457
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type, that was used in the application.
Definition realTraits.hpp:117
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
Represents the base implementation concrete lvalue in the CoDiPack expression tree.
Definition activeTypeBase.hpp:64
ActiveTypeBase(PassiveReal const &value)
Constructor.
Definition activeTypeBase.hpp:102
Impl const & StoreAs
Defines how this expression is stored in an expression tree.
Definition activeTypeBase.hpp:147
RealTraits::PassiveReal< Real > PassiveReal
Basic computation type.
Definition activeTypeBase.hpp:77
typename Tape::Identifier Identifier
See LhsExpressionInterface.
Definition activeTypeBase.hpp:78
Impl & cast()
Cast to the implementation.
Definition activeTypeBase.hpp:91
T_Impl Impl
Abbreviation for the implementing class.
Definition activeTypeBase.hpp:74
Real const & value() const
Get a constant reference to the lvalue represented by the expression.
Definition activeTypeBase.hpp:171
Impl & operator=(ActiveTypeBase const &v)
See LhsExpressionInterface::operator=(LhsExpressionInterface const&).
Definition activeTypeBase.hpp:137
Impl ActiveResult
Type into which the expression can be converted. Usually also the type from which it is constructed.
Definition activeTypeBase.hpp:148
ActiveTypeBase(ExpressionInterface< typename U::Real, Rhs > const &rhs)
Constructor.
Definition activeTypeBase.hpp:126
Real & value()
Get a reference to the lvalue represented by the expression.
Definition activeTypeBase.hpp:166
Identifier const & getIdentifier() const
Definition activeTypeBase.hpp:161
~ActiveTypeBase()
Destructor.
Definition activeTypeBase.hpp:132
ActiveTypeBase(Real const &value)
Constructor.
Definition activeTypeBase.hpp:113
ActiveTypeBase(ActiveTypeBase const &v)
Constructor.
Definition activeTypeBase.hpp:107
ActiveTypeBase()
Constructor.
Definition activeTypeBase.hpp:96
Identifier & getIdentifier()
Definition activeTypeBase.hpp:156
typename Tape::Gradient Gradient
See LhsExpressionInterface.
Definition activeTypeBase.hpp:79
ActiveTypeBase(ExpressionInterface< Real, Rhs > const &rhs)
Constructor.
Definition activeTypeBase.hpp:119
typename Tape::Real Real
See LhsExpressionInterface.
Definition activeTypeBase.hpp:76
T_Tape Tape
Definition activeTypeBase.hpp:71
Implementation of assignment operators for LhsExpressionInterface implementations.
Definition assignmentOperators.hpp:54
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:59
Impl const & cast() const
Cast to the implementation.
Definition expressionInterface.hpp:75
Implementation of increment operators for LhsExpressionInterface implementations.
Definition incrementOperators.hpp:54
Base class for all CoDiPack lvalue expression.
Definition lhsExpressionInterface.hpp:63
Real const & getValue() const
Get the primal value of this lvalue.
Definition lhsExpressionInterface.hpp:125
void destroy()
Definition lhsExpressionInterface.hpp:219
void init(Real const &newValue, EventHints::Statement statementType)
Definition lhsExpressionInterface.hpp:210