CoDiPack  3.0.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::ConstantExpression< T_Real, T_ConversionOperator > Struct Template Reference

Represents constant values in the expression tree. More...

#include <constantExpression.hpp>

Inheritance diagram for codi::ConstantExpression< T_Real, T_ConversionOperator >:

Public Types

template<typename T>
using ConversionOperator = T_ConversionOperator<T>
 See ConstantExpression.
 
using Real = T_Real
 See ConstantExpression.
 
- Public Types inherited from codi::ExpressionInterface< T_Real, ConstantExpression< T_Real, ConstantDataConversion > >
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< ConstantExpression< T_Real, ConstantDataConversion > >
using Impl
 See NodeInterface.
 
- Public Types inherited from codi::ExpressionMemberOperations< T_Real, ConstantExpression< T_Real, ConstantDataConversion > >
using Impl
 See ExpressionMemberOperations.
 
using Real
 See ExpressionMemberOperations.
 

Public Member Functions

 inlineConstantExpression (Real const &v)
 Constructor.
 
- Public Member Functions inherited from codi::ExpressionInterface< T_Real, ConstantExpression< T_Real, ConstantDataConversion > >
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< ConstantExpression< T_Real, ConstantDataConversion > >
inlineImpl const & cast () const
 Cast to the implementation.
 
char const & getLink () const
 an expression.
 

Static Public Attributes

Implementation of NodeInterface
static size_t constexpr LinkCount = 0
 handle the expression as a leaf node.
 
static size_t constexpr LinkCount
 handle the expression as a leaf node.
 

Implementation of ExpressionInterface

using StoreAs = ConstantExpression
 Defines how this expression is stored in an expression tree.
 
using ADLogic = void
 AD logic that governs the expression. Needs to be the same for all inputs of the expression.
 
inlineReal const & getValue () const
 Compute the primal value that is usually evaluated by the statement/expression.
 

Additional Inherited Members

- Protected Member Functions inherited from codi::ExpressionMemberOperations< T_Real, ConstantExpression< T_Real, ConstantDataConversion > >
inlineImpl const & cast () const
 Cast to implementation.
 

Detailed Description

template<typename T_Real, template< typename > class T_ConversionOperator = ConstantDataConversion>
struct codi::ConstantExpression< T_Real, T_ConversionOperator >

Represents constant values in the expression tree.

All values that are not a CoDiPack type are considered constant, for example values like 4.0 or double a.

See Expression design documentation for details about the expression system in CoDiPack.

Template Parameters
T_RealOriginal primal value of the statement/expression.
T_ConversionOperatorFunctions for the conversion of the constant data for primal value tape stores.

Member Typedef Documentation

◆ ADLogic

template<typename T_Real, template< typename > class T_ConversionOperator = ConstantDataConversion>
using codi::ConstantExpression< T_Real, T_ConversionOperator >::ADLogic = void

AD logic that governs the expression. Needs to be the same for all inputs of the expression.

◆ StoreAs

template<typename T_Real, template< typename > class T_ConversionOperator = ConstantDataConversion>
using codi::ConstantExpression< T_Real, T_ConversionOperator >::StoreAs = ConstantExpression

Defines how this expression is stored in an expression tree.

Member Function Documentation

◆ getValue()

template<typename T_Real, template< typename > class T_ConversionOperator = ConstantDataConversion>
inlineReal const & codi::ConstantExpression< T_Real, T_ConversionOperator >::getValue ( ) const
inline

Compute the primal value that is usually evaluated by the statement/expression.

Member Data Documentation

◆ LinkCount

template<typename T_Real, template< typename > class T_ConversionOperator = ConstantDataConversion>
size_t constexpr codi::ConstantExpression< T_Real, T_ConversionOperator >::LinkCount = 0
staticconstexpr

handle the expression as a leaf node.

Number of links the expression has. Zero will


The documentation for this struct was generated from the following file: