10 #ifndef TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
11 #define TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
28 template <
class T,
class D>
31 using device_type = D;
62 static Kokkos::View<value_type*, device_type>
65 const std::string& label =
"") {
66 using view_type = Kokkos::View<value_type*, device_type>;
77 if (std::is_same<typename view_type::traits::specialize, void>::value) {
78 return view_type(label, numEnt);
80 return view_type(label, numEnt, numVals);
88 #endif // TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
static KOKKOS_INLINE_FUNCTION size_t numValuesPerScalar(const value_type &)
Given an instance of value_type allocated with the right size, return the "number of values" that mak...
static Kokkos::View< value_type *, device_type > allocateArray(const value_type &x, const size_t numEnt, const std::string &label="")
Given an instance of value_type allocated with the right size, allocate and return a one-dimensional ...
Traits class for allocating a Kokkos::View<T*, D>.
Declaration and generic definition of traits class that tells Tpetra::CrsMatrix how to pack and unpac...