CoDiPack  3.0.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::RealTraits Namespace Reference

Traits for values that can be used as real values, e.g. double, float, codi::RealReverse etc.. More...

Classes

struct  AggregatedTypeTraits
 Methods that access inner values of aggregated types that contain CoDiPack active types. More...
 
struct  AggregatedTypeTraits< ActiveComplex< T_InnerReal > >
 Specialize real traits for std::complex. More...
 
struct  AggregatedTypeTraits< std::complex< T_InnerReal > >
 Specialize real traits for std::complex. More...
 
struct  AggregatedTypeTraits< Vector4 >
 [Base declaration] More...
 
struct  ArrayAggregatedTypeTraitsBase
 Base implementation of AggregatedTypeTraits for aggregated types that can be defined as an array. More...
 
struct  DataExtraction
 Data handling methods for aggregated types that contain CoDiPack active types. More...
 
struct  IsTotalFinite
 Function for checking if all values of the type are finite. More...
 
struct  IsTotalFinite< T_Type, TapeTraits::EnableIfForwardTape< typename T_Type::Tape > >
 Function for checking if all values of the type are finite.
More...
 
struct  IsTotalZero
 Function for checking if the value of the type is completely zero. More...
 
struct  IsTotalZero< T_Type, TapeTraits::EnableIfForwardTape< typename T_Type::Tape > >
 Function for checking if the value of the type is completely zero.
More...
 
struct  TapeRegistration
 Tape registration methods for aggregated types that contain CoDiPack active types. More...
 
struct  TraitsImplementation
 Common traits for all types used as real values. More...
 

Functions

Traits for generalized data extraction
template<typename Type>
inlinetypename DataExtraction< Type >::Real getValue (Type const &v)
 Extract an aggregate of primal values from an aggregate of active types.
 
template<typename Type>
inlinetypename DataExtraction< Type >::Identifier getIdentifier (Type const &v)
 Extract an aggregate of identifiers from an aggregate of active types.
 
template<typename Type>
inlinevoid setValue (Type &v, typename DataExtraction< Type >::Real const &value)
 Set the primal values of an aggregate of active types.
 
template<typename Type>
inlinevoid registerInput (Type &v)
 Register all active types of an aggregated type as tape inputs.
 
template<typename Type>
inlinevoid registerOutput (Type &v)
 Register all active types of an aggregated type as tape outputs.
 
template<typename Type>
inlinetypename DataExtraction< Type >::Real registerExternalFunctionOutput (Type &v)
 Register all active types of an aggregated type as external function outputs.
 

General real value traits

template<typename Type>
using Real = typename TraitsImplementation<Type>::Real
 Inner type of the real value.
 
template<typename Type>
using PassiveReal = typename TraitsImplementation<Type>::PassiveReal
 The original computation type that was used in the application.
 
template<typename Type>
inlinesize_t constexpr MaxDerivativeOrder ()
 CoDiPack derivative order of the type.
 
template<typename Type>
inlinePassiveReal< Type > getPassiveValue (Type const &v)
 Get the basic primal value of the type.
 
template<typename Type>
inlinebool isTotalFinite (Type const &v)
 Function for checking if all values of the type are finite.
 
template<typename Type>
inlinebool isTotalZero (Type const &v)
 Function for checking if the value of the type is completely zero.
 

Detection of specific real value types

template<typename Type>
using EnableIfAggregatedTypeTraitsIsSpecialized
 Enable if helper when a type has been specialized for the AggregatedTypeTraits.
 
template<typename Expr>
using EnableIfAggregatedActiveType
 Enable if helper for AggregatedActiveType.
 
template<typename Type>
using IsPassiveReal = std::is_same<Type, PassiveReal<Type>>
 If the real type is not handled by CoDiPack.
 
template<typename Type>
using EnableIfNotPassiveReal = typename std::enable_if<!IsPassiveReal<Type>::value>::type
 Negated enable if wrapper for IsPassiveReal.
 
template<typename Type>
using EnableIfPassiveReal = typename std::enable_if<IsPassiveReal<Type>::value>::type
 Enable if wrapper for IsPassiveReal.
 
template<typename Expr>
bool constexpr isPassiveReal = IsPassiveReal<Expr>::value
 Value entry of IsPassiveReal.
 

Detailed Description

Traits for values that can be used as real values, e.g. double, float, codi::RealReverse etc..

Typedef Documentation

◆ EnableIfAggregatedActiveType

template<typename Expr>
using codi::RealTraits::EnableIfAggregatedActiveType
Initial value:
typename enable_if_base_of<AggregatedActiveTypeBase<typename Expr::Real, typename Expr::InnerActiveType,
typename Expr::Impl, Expr::isStatic>,
Expr>::type
std::enable_if< std::is_base_of< Base, Impl >::value, R > enable_if_base_of
Enable if abbreviation for std::is_base_of.
Definition enableIfHelpers.hpp:47
Defines an aggregated type via an array and implements the ExpressionInterface.
Definition aggregatedActiveType.hpp:59

Enable if helper for AggregatedActiveType.

◆ EnableIfAggregatedTypeTraitsIsSpecialized

Initial value:
typename std::enable_if<(AggregatedTypeTraits<Type>::Elements != 0) &
If the expression inherits from LhsExpressionInterface. Is either std::false_type or std::true_type.
Definition expressionTraits.hpp:164
static int constexpr Elements
Number of elements of the aggregated type.
Definition realTraits.hpp:232

Enable if helper when a type has been specialized for the AggregatedTypeTraits.

◆ PassiveReal

template<typename Type>
using codi::RealTraits::PassiveReal = typename TraitsImplementation<Type>::PassiveReal

The original computation type that was used in the application.

◆ Real

template<typename Type>
using codi::RealTraits::Real = typename TraitsImplementation<Type>::Real

Inner type of the real value.

Function Documentation

◆ getIdentifier()

template<typename Type>
inlinetypename DataExtraction< Type >::Identifier codi::RealTraits::getIdentifier ( Type const & v)

Extract an aggregate of identifiers from an aggregate of active types.

◆ getPassiveValue()

template<typename Type>
inlinePassiveReal< Type > codi::RealTraits::getPassiveValue ( Type const & v)

Get the basic primal value of the type.

◆ getValue()

template<typename Type>
inlinetypename DataExtraction< Type >::Real codi::RealTraits::getValue ( Type const & v)

Extract an aggregate of primal values from an aggregate of active types.

◆ isTotalFinite()

template<typename Type>
inlinebool codi::RealTraits::isTotalFinite ( Type const & v)

Function for checking if all values of the type are finite.

Template Parameters
T_TypeThe type of the real value.

◆ isTotalZero()

template<typename Type>
inlinebool codi::RealTraits::isTotalZero ( Type const & v)

Function for checking if the value of the type is completely zero.

Template Parameters
T_TypeThe type of the real value.

◆ MaxDerivativeOrder()

template<typename Type>
inlinesize_t constexpr codi::RealTraits::MaxDerivativeOrder ( )
constexpr

CoDiPack derivative order of the type.

◆ registerExternalFunctionOutput()

template<typename Type>
inlinetypename DataExtraction< Type >::Real codi::RealTraits::registerExternalFunctionOutput ( Type & v)

Register all active types of an aggregated type as external function outputs.

◆ registerInput()

template<typename Type>
inlinevoid codi::RealTraits::registerInput ( Type & v)

Register all active types of an aggregated type as tape inputs.

◆ registerOutput()

template<typename Type>
inlinevoid codi::RealTraits::registerOutput ( Type & v)

Register all active types of an aggregated type as tape outputs.

◆ setValue()

template<typename Type>
inlinevoid codi::RealTraits::setValue ( Type & v,
typename DataExtraction< Type >::Real const & value )

Set the primal values of an aggregate of active types.