Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_Details_ScalarViewTraits.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
11#define TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
12
18
20
21namespace Tpetra {
22namespace Details {
23
28template <class T, class D>
30 using value_type = T;
31 using device_type = D;
32
57 static Kokkos::View<value_type*, device_type>
59 const size_t numEnt,
60 const std::string& label = "") {
61 using view_type = Kokkos::View<value_type*, device_type>;
62 return view_type(label, numEnt);
63 }
64}; // struct ScalarViewTraits
65
66} // namespace Details
67} // namespace Tpetra
68
69#endif // TPETRA_DETAILS_SCALARVIEWTRAITS_HPP
Declaration and generic definition of traits class that tells Tpetra::CrsMatrix how to pack and unpac...
Struct that holds views of the contents of a CrsMatrix.
Implementation details of Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Traits class for allocating a Kokkos::View<T*, D>.
static Kokkos::View< value_type *, device_type > allocateArray(const value_type &, 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 ...