30 #ifndef SACADO_FAD_SIMPLEFADTRAITS_HPP
31 #define SACADO_FAD_SIMPLEFADTRAITS_HPP
38 template <
typename T>
class SimpleFad;
48 template <typename ValueT>
54 template <
typename ValueT>
60 template <
typename ValueT>
66 template <
typename ValueT>
68 static const bool value =
false;
72 template <
typename ValueT>
78 template <
typename ValueT>
79 struct Value< Fad::SimpleFad<ValueT> > {
86 template <
typename ValueT>
95 template <
typename ValueT>
97 static std::string
eval() {
98 return std::string(
"Sacado::Fad::SimpleFad< ") +
103 template <
typename ValueT>
112 template <
typename ValueT>
118 template <
typename ValueT>
119 struct IsFad< Fad::SimpleFad<ValueT> > {
130 #ifdef HAVE_SACADO_TEUCHOSNUMERICS
133 template <
typename ValueT>
134 struct PromotionTraits< Sacado::Fad::SimpleFad<ValueT>,
141 template <
typename ValueT,
typename R>
142 struct PromotionTraits< Sacado::Fad::SimpleFad<ValueT>,
R > {
147 template <
typename L,
typename ValueT>
148 struct PromotionTraits< L, Sacado::Fad::SimpleFad<ValueT> > {
157 #ifdef HAVE_SACADO_TEUCHOSCORE
160 template <
typename ValueT>
161 struct ScalarTraits< Sacado::Fad::SimpleFad<ValueT> > :
162 public Sacado::Fad::ScalarTraitsImp< Sacado::Fad::SimpleFad<ValueT> >
168 #ifdef HAVE_SACADO_TEUCHOSCOMM
171 template <
typename Ordinal,
typename ValueT>
172 struct SerializationTraits<
Ordinal, Sacado::Fad::SimpleFad<ValueT> > :
173 public Sacado::Fad::SerializationTraitsImp< Ordinal,
174 Sacado::Fad::SimpleFad<ValueT> >
177 template <
typename Ordinal,
typename ValueT>
178 struct ValueTypeSerializer<
Ordinal, Sacado::Fad::SimpleFad<ValueT> > :
179 public Sacado::Fad::SerializerImp< Ordinal,
180 Sacado::Fad::SimpleFad<ValueT>,
181 ValueTypeSerializer<Ordinal,ValueT> >
184 typedef ValueTypeSerializer<Ordinal,ValueT> ValueSerializer;
185 typedef Sacado::Fad::SerializerImp< Ordinal,FadType,ValueSerializer> Base;
193 #endif // SACADO_FAD_SIMPLEFADTRAITS_HPP
static SACADO_INLINE_FUNCTION const T & eval(const T &x)
static bool eval(const Fad::SimpleFad< ValueT > &x, const Fad::SimpleFad< ValueT > &y)
static std::string eval()
ValueType< Fad::SimpleFad< ValueT > >::type value_type
Base template specification for ScalarValue.
Base template specification for ScalarType.
Base template specification for whether a type is a Fad type.
Base template specification for string names of types.
Base template specification for IsADType.
static const scalar_type & eval(const Fad::SimpleFad< ValueT > &x)
Sacado::Fad::DFad< double > FadType
ScalarType< ValueT >::type ScalarT
Typename of scalar's (which may be different from ValueT)
Base template specification for Value.
Forward-mode AD class using dynamic memory allocation but no expression templates.
Base template specification for IsSimdType.
#define SACADO_FAD_PROMOTE_SPEC(NS, FAD)
Base template specification for testing equivalence.
static std::string eval()
bool isEqualTo(const SimpleFad &x) const
Returns whether two Fad objects have the same values.
SACADO_INLINE_FUNCTION const ValueT & val() const
Returns value.
ScalarType< Fad::SimpleFad< ValueT > >::type scalar_type
Fad::SimpleFad< ValueT >::ScalarT type
Base template specification for IsScalarType.
static const value_type & eval(const Fad::SimpleFad< ValueT > &x)
Base template specification for ValueType.
ValueType< Fad::SimpleFad< ValueT > >::type value_type
Base template specification for testing whether type is statically sized.