42 #ifndef TPETRA_DETAILS_FILL_UQ_PCE_HPP
43 #define TPETRA_DETAILS_FILL_UQ_PCE_HPP
45 #include "Tpetra_Details_fill.hpp"
52 template<
class DT,
class ... DP,
56 typename std::enable_if<
58 fill (
const ExecutionSpace& execSpace,
59 const Kokkos::View<DT,DP...>& X,
60 const ValueType& alpha,
61 const IndexType numRows,
62 const IndexType numCols)
64 static_assert (std::is_integral<IndexType>::value,
65 "IndexType must be a built-in integer type.");
69 template<
class DT,
class ... DP,
73 typename std::enable_if<
75 fill (
const ExecutionSpace& execSpace,
76 const Kokkos::View<DT,DP...>& X,
77 const ValueType& alpha,
78 const IndexType numRows,
79 const IndexType numCols,
80 const size_t whichVectors[])
82 typedef Kokkos::View<DT,DP...> ViewType;
83 static_assert (ViewType::Rank == 2,
"ViewType must be a rank-2 "
84 "Kokkos::View in order to call the \"whichVectors\" "
85 "specialization of fill.");
86 static_assert (std::is_integral<IndexType>::value,
87 "IndexType must be a built-in integer type.");
88 for (IndexType k = 0; k < numCols; ++k) {
89 const IndexType
j = whichVectors[k];
90 auto X_j = Kokkos::subview (X, Kokkos::ALL (), j);
99 #endif // TPETRA_DETAILS_FILL_UQ_PCE_HPP
void deep_copy(const Stokhos::CrsMatrix< ValueType, DstDevice, Layout > &dst, const Stokhos::CrsMatrix< ValueType, SrcDevice, Layout > &src)
std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< DT, DP...> >::value >::type fill(const ExecutionSpace &execSpace, const Kokkos::View< DT, DP...> &X, const ValueType &alpha, const IndexType numRows, const IndexType numCols)