Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_Tpetra_MP_Vector.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_TPETRA_MP_VECTOR_HPP
11 #define STOKHOS_TPETRA_MP_VECTOR_HPP
12 
13 // This header file should be included whenever compiling any Tpetra
14 // code with Stokhos scalar types
15 
16 // MP includes and specializations
18 
19 // Kokkos includes
20 #include "Tpetra_ConfigDefs.hpp"
21 #include "Kokkos_Core.hpp"
22 #if defined(HAVE_TPETRACORE_TEUCHOSKOKKOSCOMPAT)
23 #include <Tpetra_KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
24 #include "KokkosCompat_View.hpp"
25 #include "KokkosCompat_View_def.hpp"
26 #endif
27 
28 // Kokkos-Linalg
31 #include "Kokkos_MV_MP_Vector.hpp"
32 
33 // Order may be important here because Cuda provides a slightly more
34 // specialized version of MV_Multiply() for a single column
37 
43 
44 #include "KokkosBlas_MP_Vector.hpp"
45 
46 namespace Stokhos {
47 
54 template <typename Node>
55 struct DeviceForNode {
56 #if defined(KOKKOS_ENABLE_SERIAL)
57  // Prefer the Kokkos::Serial execution space if it exists.
58  typedef Kokkos::Serial type;
59 #else
60  // If the Kokkos::Serial execution space does not exist, use the
61  // default host execution space. Kokkos::HostSpace (the host memory
62  // space) always exists, and it always has an execution_space
63  // typedef, which corresponds to the default host execution space.
65 #endif // defined(KOKKOS_ENABLE_SERIAL)
66 };
67 
68 #if defined(HAVE_TPETRACORE_TEUCHOSKOKKOSCOMPAT)
69 template <typename ExecSpace, typename MemSpace>
73 struct DeviceForNode< Tpetra::KokkosCompat::KokkosDeviceWrapperNode<ExecSpace, MemSpace> > {
74  typedef typename Tpetra::KokkosCompat::KokkosDeviceWrapperNode<ExecSpace, MemSpace>::device_type type;
75 };
76 #endif
77 
78 }
79 
80 #endif // STOKHOS_TPETRA_MP_VECTOR_HPP
Kokkos::DefaultExecutionSpace execution_space
Trait class that determines (new) Kokkos execution space type from Kokkos(Classic) Node type...
Kokkos::HostSpace::execution_space type