29namespace DefaultTypes {
31#if defined(HAVE_TPETRA_INST_DOUBLE)
32 using scalar_type =
double;
33#elif defined(HAVE_TPETRA_INST_FLOAT)
34 using scalar_type =
float;
36# error "Tpetra: No scalar types in the set {float, double} have been enabled."
44#if defined(HAVE_TPETRA_INST_INT_LONG_LONG)
45 using global_ordinal_type =
long long;
46#elif defined(HAVE_TPETRA_INST_INT_INT)
47 using global_ordinal_type =
int;
48#elif defined(HAVE_TPETRA_INST_INT_LONG)
49 using global_ordinal_type =
long;
50#elif defined(HAVE_TPETRA_INST_INT_UNSIGNED_LONG)
51 using global_ordinal_type =
unsigned long;
52#elif defined(HAVE_TPETRA_INST_INT_UNSIGNED)
53 using global_ordinal_type =
unsigned;
55 #error "Tpetra: No global ordinal types in the set {int, long long, long, unsigned long, unsigned} have been enabled."
60#if defined(HAVE_TPETRA_DEFAULTNODE_SYCLWRAPPERNODE)
61 using execution_space = ::Kokkos::Experimental::SYCL;
62 using node_type = Tpetra::KokkosCompat::KokkosSYCLWrapperNode;
63#elif defined(HAVE_TPETRA_DEFAULTNODE_HIPWRAPPERNODE)
64 using execution_space = ::Kokkos::HIP;
65 using node_type = Tpetra::KokkosCompat::KokkosHIPWrapperNode;
66#elif defined(HAVE_TPETRA_DEFAULTNODE_CUDAWRAPPERNODE)
67 using execution_space = ::Kokkos::Cuda;
68 using node_type = Tpetra::KokkosCompat::KokkosCudaWrapperNode;
69#elif defined(HAVE_TPETRA_DEFAULTNODE_OPENMPWRAPPERNODE)
70 using execution_space = ::Kokkos::OpenMP;
71 using node_type = Tpetra::KokkosCompat::KokkosOpenMPWrapperNode;
72#elif defined(HAVE_TPETRA_DEFAULTNODE_THREADSWRAPPERNODE)
73 using execution_space = ::Kokkos::Threads;
74 using node_type = Tpetra::KokkosCompat::KokkosThreadsWrapperNode;
75#elif defined(HAVE_TPETRA_DEFAULTNODE_SERIALWRAPPERNODE)
76 using execution_space = ::Kokkos::Serial;
77 using node_type = Tpetra::KokkosCompat::KokkosSerialWrapperNode;
79# error "No default Tpetra Node type specified. Please set the CMake option Tpetra_DefaultNode to a valid Node type."
86 template<
typename ExecutionSpace>
89 using type =
typename ExecutionSpace::memory_space;
92#ifdef KOKKOS_ENABLE_CUDA
96 using type = Kokkos::CudaSpace;
100#ifdef KOKKOS_ENABLE_HIP
102 struct CommBufferMemorySpace<
Kokkos::
HIP>
104 using type = Kokkos::HIPSpace;
108#ifdef KOKKOS_ENABLE_SYCL
110 struct CommBufferMemorySpace<
Kokkos::Experimental::SYCL>
112 using type = Kokkos::Experimental::SYCLDeviceUSMSpace;
116 template<
typename Device>
117 using comm_buffer_memory_space =
typename CommBufferMemorySpace<typename Device::execution_space>::type;