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
Sacado_Traits.hpp File Reference
#include "Sacado_ConfigDefs.h"
#include "Sacado_dummy_arg.hpp"
#include "Sacado_mpl_enable_if.hpp"
#include "Sacado_mpl_disable_if.hpp"
#include "Sacado_mpl_is_convertible.hpp"
#include "Sacado_mpl_is_same.hpp"
#include <string>
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< mpl::is_convertible< A, B >::value &&!mpl::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< mpl::is_convertible< B, A >::value &&!mpl::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< mpl::is_convertible< A, B >::value &&mpl::is_convertible< B, A >::value &&!mpl::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< !mpl::is_convertible< A, B >::value &&!mpl::is_convertible< B, A >::value &&IsExpr< A >::value &&mpl::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< !mpl::is_convertible< A, B >::value &&!mpl::is_convertible< B, A >::value &&IsExpr< B >::value &&mpl::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< !mpl::is_convertible< A, B >::value &&!mpl::is_convertible< B, A >::value &&IsExpr< A >::value &&IsExpr< B >::value &&mpl::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::ScalarValue< T >
 Base template specification for ScalarValue. 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...
 

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:96

Specialization of Promote to builtin types.

Definition at line 207 of file Sacado_Traits.hpp.

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

Definition at line 235 of file Sacado_Traits.hpp.

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

Definition at line 237 of file Sacado_Traits.hpp.

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

Definition at line 239 of file Sacado_Traits.hpp.

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

Definition at line 241 of file Sacado_Traits.hpp.

#define SACADO_EXPR_PROMOTE_SPEC (   NS)    /* */

Definition at line 243 of file Sacado_Traits.hpp.

#define SACADO_VFAD_PROMOTE_SPEC (   NS)    /* */

Definition at line 245 of file Sacado_Traits.hpp.

#define SACADO_RAD_PROMOTE_SPEC (   NS)

Definition at line 247 of file Sacado_Traits.hpp.

#define SACADO_BUILTIN_SPECIALIZATION (   t,
  NAME 
)

Specialization of above classes to builtin types.

Definition at line 437 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; \
};

Definition at line 470 of file Sacado_Traits.hpp.