42 #ifndef KOKKOS_INNER_PRODUCT_SPACE_TRAITS_UQ_PCE_HPP 43 #define KOKKOS_INNER_PRODUCT_SPACE_TRAITS_UQ_PCE_HPP 46 #include "Kokkos_InnerProductSpaceTraits.hpp" 58 class InnerProductSpaceTraits<
Sacado::UQ::PCE<S> > {
64 typedef InnerProductSpaceTraits<base_value_type>
BIT;
67 typedef typename ArithTraits<val_type>::mag_type
mag_type;
70 static KOKKOS_FORCEINLINE_FUNCTION
76 const mag_type n = BIT::norm(
x.fastAccessCoeff(i) );
82 static KOKKOS_FORCEINLINE_FUNCTION
89 if (
x.hasFastAccess(sz) &&
y.hasFastAccess(sz))
91 r +=
BIT::dot(
x.fastAccessCoeff(i),
y.fastAccessCoeff(i) );
101 template <
typename S>
102 class InnerProductSpaceTraits< const
Sacado::UQ::PCE<S> > {
108 typedef InnerProductSpaceTraits<base_value_type>
BIT;
111 typedef typename ArithTraits<val_type>::mag_type
mag_type;
114 static KOKKOS_FORCEINLINE_FUNCTION
120 const mag_type n = BIT::norm(
x.fastAccessCoeff(i) );
126 static KOKKOS_FORCEINLINE_FUNCTION
133 if (
x.hasFastAccess(sz) &&
y.hasFastAccess(sz))
135 r +=
BIT::dot(
x.fastAccessCoeff(i),
y.fastAccessCoeff(i) );
KOKKOS_INLINE_FUNCTION PCE< Storage > sqrt(const PCE< Storage > &a)
BIT::dot_type base_dot_type
ArithTraits< val_type >::mag_type mag_type
InnerProductSpaceTraits< base_value_type > BIT
val_type::value_type base_value_type
static KOKKOS_FORCEINLINE_FUNCTION dot_type dot(const val_type &x, const val_type &y)
Sacado::UQ::PCE< S > val_type
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
val_type::ordinal_type ordinal_type
static KOKKOS_FORCEINLINE_FUNCTION mag_type norm(const val_type &x)
val_type::ordinal_type ordinal_type
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< XD, XP... > >::value &&Kokkos::is_view_uq_pce< Kokkos::View< YD, YP... > >::value, typename Kokkos::Details::InnerProductSpaceTraits< typename Kokkos::View< XD, XP... >::non_const_value_type >::dot_type >::type dot(const Kokkos::View< XD, XP... > &x, const Kokkos::View< YD, YP... > &y)
static KOKKOS_FORCEINLINE_FUNCTION mag_type norm(const val_type &x)
static KOKKOS_FORCEINLINE_FUNCTION dot_type dot(const val_type &x, const val_type &y)
ArithTraits< val_type >::mag_type mag_type
Sacado::UQ::PCE< S > val_type
InnerProductSpaceTraits< base_value_type > BIT
BIT::dot_type base_dot_type
val_type::value_type base_value_type
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType * y