10 #ifndef SACADO_UQ_PCE_TRAITS_HPP
11 #define SACADO_UQ_PCE_TRAITS_HPP
13 #include "Sacado_Traits.hpp"
14 #include "Sacado_mpl_apply.hpp"
19 template <
typename S>
class PCE;
26 SACADO_AD_PROMOTE_SPEC( UQ, PCE )
30 struct ScalarType< UQ::PCE<S> > {
36 struct ValueType< UQ::PCE<S> > {
42 struct IsADType< UQ::PCE<S> > {
43 static const bool value =
true;
48 struct IsScalarType< UQ::PCE<S> > {
49 static const bool value =
false;
54 struct Value< UQ::PCE<S> > {
55 typedef typename ValueType< UQ::PCE<S> >::type
value_type;
56 KOKKOS_INLINE_FUNCTION
63 struct ScalarValue< UQ::PCE<S> > {
64 typedef typename ValueType< UQ::PCE<S> >::type
value_type;
66 KOKKOS_INLINE_FUNCTION
68 return ScalarValue<value_type>::eval(x.val()); }
73 struct StringName< UQ::PCE<S> > {
74 static std::string
eval() {
75 return std::string(
"Sacado::UQ::PCE< ") +
76 StringName<S>::eval() +
" >"; }
81 struct IsEqual< UQ::PCE<S> > {
82 KOKKOS_INLINE_FUNCTION
85 return x.isEqualTo(y);
91 struct IsStaticallySized< UQ::PCE<S> > {
92 static const bool value = S::is_static;
107 template <
typename S>
110 typedef typename Sacado::Promote< Sacado::UQ::PCE<S>,
116 template <
typename S,
typename R>
118 typedef typename Sacado::Promote< Sacado::UQ::PCE<S>, R >::type
123 template <
typename L,
typename S>
126 typedef typename Sacado::Promote< L, Sacado::UQ::PCE<S> >::type
131 template <
typename S>
136 template <
typename TypeTo,
typename S>
139 Sacado::UQ::PCE<S> > {};
142 template <
typename Ordinal,
typename S>
149 template <
typename Ordinal,
typename S>
153 ValueTypeSerializer<Ordinal,typename S::value_type> >
170 #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