Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Enumerations | Functions
Sacado_Traits.hpp File Reference
#include <string>
#include <type_traits>
#include "Sacado_ConfigDefs.h"
#include "Sacado_dummy_arg.hpp"
#include "Sacado_mpl_enable_if.hpp"
#include "Sacado_mpl_disable_if.hpp"
Include dependency graph for Sacado_Traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Sacado::IsExpr< T >
 Is a type an expression. More...
 
struct  Sacado::IsView< T >
 Determine whether a given type is a view. More...
 
struct  Sacado::BaseExprType< T >
 Get the base Fad type from a view/expression. More...
 
struct  Sacado::ViewFadType< typename, unsigned, unsigned >
 Get view type for any Fad type. More...
 
struct  Sacado::OverrideDefaultPromote< T >
 Specialize this for a given type T to disable default Promote rules. More...
 
struct  Sacado::Promote< A, B, Enabled >
 Base template specification for Promote. More...
 
struct  Sacado::Promote< A, A, typename mpl::enable_if_c< !OverrideDefaultPromote< A >::value >::type >
 Specialization of Promote for a single type. More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< std::is_convertible< A, B >::value &&!std::is_convertible< B, A >::value &&!OverrideDefaultPromote< A >::value &&!OverrideDefaultPromote< B >::value >::type >
 Specialization of Promote when A is convertible to B but not vice-versa. More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< std::is_convertible< B, A >::value &&!std::is_convertible< A, B >::value &&!OverrideDefaultPromote< A >::value &&!OverrideDefaultPromote< B >::value >::type >
 Specialization of Promote when B is convertible to A but not vice-versa. More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< std::is_convertible< A, B >::value &&std::is_convertible< B, A >::value &&!std::is_same< A, B >::value &&(IsExpr< A >::value||IsExpr< B >::value) >::type >
 Specialization of Promote when A and B are convertible to each other, and one of them is an expression. More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< !std::is_convertible< A, B >::value &&!std::is_convertible< B, A >::value &&IsExpr< A >::value &&std::is_convertible< B, typename BaseExprType< typename A::value_type >::type >::value >::type >
 Specialization of Promote when A is an expression and B is convertible to its value-type, e.g., Promote< fad-expression, double > (using BaseExprType to remove ViewFad) More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< !std::is_convertible< A, B >::value &&!std::is_convertible< B, A >::value &&IsExpr< B >::value &&std::is_convertible< A, typename BaseExprType< typename B::value_type >::type >::value >::type >
 Specialization of Promote when B is an expression and A is convertible to its value-type, e.g., Promote< double, fad-expression > (using BaseExprType to remove ViewFad) More...
 
struct  Sacado::Promote< A, B, typename mpl::enable_if_c< !std::is_convertible< A, B >::value &&!std::is_convertible< B, A >::value &&IsExpr< A >::value &&IsExpr< B >::value &&std::is_same< typename BaseExprType< typename A::value_type >::type, typename BaseExprType< typename B::value_type >::type >::value >::type >
 Specialization of Promote when A and B are (different) expressions, with the same value type, e.g, Promote< fad-expr1, fad-expr2 > (using BaseExprType to remove ViewFad) More...
 
struct  Sacado::ScalarType< T >
 Base template specification for ScalarType. More...
 
struct  Sacado::ScalarType< const T >
 Specialization of ScalarType for const types. More...
 
struct  Sacado::ValueType< T >
 Base template specification for ValueType. More...
 
struct  Sacado::ValueType< const T >
 Specialization of ValueType for const types. More...
 
struct  Sacado::IsADType< T >
 Base template specification for IsADType. More...
 
struct  Sacado::IsScalarType< T >
 Base template specification for IsScalarType. More...
 
struct  Sacado::IsSimdType< T >
 Base template specification for IsSimdType. More...
 
struct  Sacado::Value< T >
 Base template specification for Value. More...
 
struct  Sacado::Value< const T >
 Specialization of Value for const types. More...
 
struct  Sacado::ScalarValue< T >
 Base template specification for ScalarValue. More...
 
struct  Sacado::ScalarValue< const T >
 Specialization of ScalarValue for const types. More...
 
struct  Sacado::MarkConstant< T >
 Base template specification for marking constants. More...
 
struct  Sacado::StringName< T >
 Base template specification for string names of types. More...
 
struct  Sacado::IsEqual< T >
 Base template specification for testing equivalence. More...
 
struct  Sacado::IsStaticallySized< T >
 Base template specification for testing whether type is statically sized. More...
 
struct  Sacado::IsStaticallySized< const T >
 Specialization of IsStaticallySized for const types. More...
 
struct  Sacado::StaticSize< T >
 Base template specification for static size. More...
 
struct  Sacado::IsFad< T >
 Base template specification for whether a type is a Fad type. More...
 
struct  Sacado::IsFad< const T >
 Base template specification for whether a type is a Fad type. More...
 
struct  Sacado::RemoveConst< T >
 Remove const from a type. More...
 
struct  Sacado::RemoveConst< const T >
 Remove const from a type. More...
 
struct  Sacado::integral_nonzero< T, v, NonZero >
 
struct  Sacado::integral_nonzero< T, zero, false >
 

Namespaces

 Sacado
 

Macros

#define SACADO_PROMOTE_SPECIALIZATION(type1, type2, type3)
 Specialization of Promote to builtin types. More...
 
#define SACADO_AD_PROMOTE_SPEC(NS, AD)   /* */
 
#define SACADO_AD_PROMOTE_SPEC2(NS, AD)   /* */
 
#define SACADO_FAD_PROMOTE_SPEC(NS, FAD)   /* */
 
#define SACADO_SFAD_PROMOTE_SPEC(NS, FAD)   /* */
 
#define SACADO_EXPR_PROMOTE_SPEC(NS)   /* */
 
#define SACADO_VFAD_PROMOTE_SPEC(NS)   /* */
 
#define SACADO_RAD_PROMOTE_SPEC(NS)
 
#define SACADO_BUILTIN_SPECIALIZATION(t, NAME)
 Specialization of above classes to builtin types. More...
 
#define SACADO_BUILTIN_SPECIALIZATION_COMPLEX(t, NAME)
 

Enumerations

enum  Sacado::DerivInit { Sacado::NoInitDerivArray = 0, Sacado::InitDerivArray }
 Enum use to signal whether the derivative array should be initialized in AD object constructors. More...
 

Functions

template<typename T >
SACADO_INLINE_FUNCTION
ScalarType< T >::type 
Sacado::scalarValue (const T &x)
 A simple template function for invoking ScalarValue<> More...
 

Macro Definition Documentation

#define SACADO_PROMOTE_SPECIALIZATION (   type1,
  type2,
  type3 
)
Value:
template <> struct Promote< type1, type2, void > { \
typedef type3 type; \
}; \
template <> struct Promote< type2, type1, void > { \
typedef type3 type; \
};
void
Definition: uninit.c:105

Specialization of Promote to builtin types.

Definition at line 188 of file Sacado_Traits.hpp.

#define SACADO_AD_PROMOTE_SPEC (   NS,
  AD 
)    /* */

Definition at line 216 of file Sacado_Traits.hpp.

#define SACADO_AD_PROMOTE_SPEC2 (   NS,
  AD 
)    /* */

Definition at line 218 of file Sacado_Traits.hpp.

#define SACADO_FAD_PROMOTE_SPEC (   NS,
  FAD 
)    /* */

Definition at line 220 of file Sacado_Traits.hpp.

#define SACADO_SFAD_PROMOTE_SPEC (   NS,
  FAD 
)    /* */

Definition at line 222 of file Sacado_Traits.hpp.

#define SACADO_EXPR_PROMOTE_SPEC (   NS)    /* */

Definition at line 224 of file Sacado_Traits.hpp.

#define SACADO_VFAD_PROMOTE_SPEC (   NS)    /* */

Definition at line 226 of file Sacado_Traits.hpp.

#define SACADO_RAD_PROMOTE_SPEC (   NS)

Definition at line 228 of file Sacado_Traits.hpp.

#define SACADO_BUILTIN_SPECIALIZATION (   t,
  NAME 
)

Specialization of above classes to builtin types.

Definition at line 443 of file Sacado_Traits.hpp.

#define SACADO_BUILTIN_SPECIALIZATION_COMPLEX (   t,
  NAME 
)
Value:
template <> struct ScalarType< t > { \
typedef t type; \
}; \
template <> struct ValueType< t > { \
typedef t type; \
}; \
template <> struct IsADType< t > { \
static const bool value = false; \
}; \
template <> struct IsScalarType< t > { \
static const bool value = true; \
}; \
template <> struct Value< t > { \
static const t& eval(const t& x) { return x; } \
}; \
template <> struct ScalarValue< t > { \
static const t& eval(const t& x) { return x; } \
}; \
template <> struct StringName< t > { \
static std::string eval() { return NAME; } \
}; \
template <> struct IsEqual< t > { \
static bool eval(const t& x, const t& y) { \
return x == y; } \
}; \
template <> struct IsStaticallySized< t > { \
static const bool value = true; \
};
int value
const double y

Definition at line 476 of file Sacado_Traits.hpp.