CoDiPack  2.2.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  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...
 

Typedefs

Detection of specific real value types
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.
 

Functions

Traits for generalized data extraction
template<typename Type >
DataExtraction< Type >::Real getValue (Type const &v)
 Extract the primal values from a type of aggregated active types.
 
template<typename Type >
DataExtraction< Type >::Identifier getIdentifier (Type const &v)
 Extract the identifiers from a type of aggregated active types.
 
template<typename Type >
void setValue (Type &v, typename DataExtraction< Type >::Real const &value)
 Set the primal values of a type of aggregated active types.
 
template<typename Type >
void registerInput (Type &v)
 Register all active types of a aggregated type as tape input.
 
template<typename Type >
void registerOutput (Type &v)
 Register all active types of a aggregated type as tape output.
 
template<typename Type >
DataExtraction< Type >::Identifier registerExternalFunctionOutput (Type &v)
 Register all active types of a 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 >
size_t constexpr MaxDerivativeOrder ()
 CoDiPack derivative order of the type.
 
template<typename Type >
PassiveReal< Type > const & getPassiveValue (Type const &v)
 Get the basic primal value of the type.
 
template<typename Type >
bool isTotalFinite (Type const &v)
 Function for checking if all values of the type are finite.
 
template<typename Type >
bool isTotalZero (Type const &v)
 Function for checking if the value of the type is completely zero.
 

Detailed Description

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

Typedef Documentation

◆ PassiveReal

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

The original computation type, that was used in the application.

◆ Real

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

Inner type of the real value.

Function Documentation

◆ getIdentifier()

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

Extract the identifiers from a type of aggregated active types.

◆ getPassiveValue()

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

Get the basic primal value of the type.

◆ getValue()

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

Extract the primal values from a type of aggregated active types.

◆ isTotalFinite()

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

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

Template Parameters
T_TypeThe type of the real value.

◆ isTotalZero()

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

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 >
size_t constexpr codi::RealTraits::MaxDerivativeOrder ( )
inlineconstexpr

CoDiPack derivative order of the type.

◆ registerExternalFunctionOutput()

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

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

◆ registerInput()

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

Register all active types of a aggregated type as tape input.

◆ registerOutput()

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

Register all active types of a aggregated type as tape output.

◆ setValue()

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

Set the primal values of a type of aggregated active types.