42 #ifndef SACADO_UQ_PCE_TRAITS_HPP
43 #define SACADO_UQ_PCE_TRAITS_HPP
45 #include "Sacado_Traits.hpp"
46 #include "Sacado_mpl_apply.hpp"
51 template <
typename S>
class PCE;
58 SACADO_AD_PROMOTE_SPEC( UQ, PCE )
62 struct ScalarType< UQ::PCE<S> > {
68 struct ValueType< UQ::PCE<S> > {
74 struct IsADType< UQ::PCE<S> > {
75 static const bool value =
true;
80 struct IsScalarType< UQ::PCE<S> > {
81 static const bool value =
false;
86 struct Value< UQ::PCE<S> > {
87 typedef typename ValueType< UQ::PCE<S> >::type
value_type;
88 KOKKOS_INLINE_FUNCTION
95 struct ScalarValue< UQ::PCE<S> > {
96 typedef typename ValueType< UQ::PCE<S> >::type
value_type;
98 KOKKOS_INLINE_FUNCTION
100 return ScalarValue<value_type>::eval(x.val()); }
104 template <
typename S>
105 struct StringName< UQ::PCE<S> > {
107 return std::string(
"Sacado::UQ::PCE< ") +
108 StringName<S>::eval() +
" >"; }
112 template <
typename S>
113 struct IsEqual< UQ::PCE<S> > {
114 KOKKOS_INLINE_FUNCTION
117 return x.isEqualTo(y);
122 template <
typename S>
123 struct IsStaticallySized< UQ::PCE<S> > {
124 static const bool value = S::is_static;
139 template <
typename S>
142 typedef typename Sacado::Promote< Sacado::UQ::PCE<S>,
148 template <
typename S,
typename R>
150 typedef typename Sacado::Promote< Sacado::UQ::PCE<S>, R >::type
155 template <
typename L,
typename S>
158 typedef typename Sacado::Promote< L, Sacado::UQ::PCE<S> >::type
163 template <
typename S>
168 template <
typename TypeTo,
typename S>
171 Sacado::UQ::PCE<S> > {};
174 template <
typename Ordinal,
typename S>
181 template <
typename Ordinal,
typename S>
185 ValueTypeSerializer<Ordinal,typename S::value_type> >
202 #endif // SACADO_UQ_PCE_TRAITS_HPP
ScalarType< UQ::PCE< S > >::type scalar_type
Serializer object for all PCE types.
Implementation for Teuchos::ScalarTraits for all PCE types.
Implementation for Teuchos::ValueTypeConversionTraits for all PCE types.
static std::string eval()
ValueTypeSerializer< Ordinal, typename S::value_type > ValueSerializer
static KOKKOS_INLINE_FUNCTION bool eval(const UQ::PCE< S > &x, const UQ::PCE< S > &y)
ValueType< UQ::PCE< S > >::type value_type
ScalarType< typename UQ::PCE< S >::value_type >::type type
PCEType::cijk_type cijk_type
Typename of cijk.
UQ::PCE< S >::value_type type
ValueTypeSerializer(const cijk_type &cijk, const Teuchos::RCP< const ValueSerializer > &vs)
Sacado::UQ::PCESerializerImp< Ordinal, PCEType, ValueSerializer > Base
static KOKKOS_INLINE_FUNCTION const scalar_type & eval(const UQ::PCE< S > &x)
KOKKOS_INLINE_FUNCTION constexpr std::enable_if< is_view_uq_pce< view_type >::value, typename CijkType< view_type >::type >::type cijk(const view_type &view)
Base::cijk_type cijk_type
Implementation of Teuchos::SerializationTraits for all PCE types.
static KOKKOS_INLINE_FUNCTION const value_type & eval(const UQ::PCE< S > &x)
ValueType< UQ::PCE< S > >::type value_type
Sacado::UQ::PCE< S > PCEType