52 #ifndef AMESOS2_KOKKOS_IMPL_HPP
53 #define AMESOS2_KOKKOS_IMPL_HPP
55 #include <type_traits>
57 #include <KokkosSparse_CrsMatrix.hpp>
59 #define AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(S,LO,EXEC_SPACE) \
60 template class Amesos2::AMESOS2_KOKKOS_IMPL_SOLVER_NAME<KokkosSparse::CrsMatrix<S, LO, \
61 typename EXEC_SPACE::device_type>, \
62 Kokkos::View<S**, Kokkos::LayoutLeft, typename EXEC_SPACE::device_type> >;
64 #define AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER_UVM_OFF(S,LO) \
65 template class Amesos2::AMESOS2_KOKKOS_IMPL_SOLVER_NAME<KokkosSparse::CrsMatrix<S, LO, \
66 Kokkos::Device<Kokkos::Cuda,Kokkos::CudaSpace>>, \
67 Kokkos::View<S**, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Cuda,Kokkos::CudaSpace>> >;
70 #if defined(KOKKOS_ENABLE_SERIAL)
71 #ifdef HAVE_TPETRA_INST_FLOAT
72 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
float,
int, Kokkos::Serial)
74 #ifdef HAVE_TPETRA_INST_DOUBLE
75 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
double,
int, Kokkos::Serial)
77 #ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
78 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<float>,
int, Kokkos::Serial)
80 #ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
81 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<double>,
int, Kokkos::Serial)
85 #if defined(KOKKOS_ENABLE_THREADS)
86 #define EXEC_SPACE Kokkos::Threads
87 #ifdef HAVE_TPETRA_INST_FLOAT
88 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
float,
int, Kokkos::Threads)
90 #ifdef HAVE_TPETRA_INST_DOUBLE
91 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
double,
int, Kokkos::Threads)
93 #ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
94 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<float>,
int, Kokkos::Threads)
96 #ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
97 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<double>,
int, Kokkos::Threads)
99 #endif // KOKKOS_ENABLE_THREADS
101 #if defined(KOKKOS_ENABLE_OPENMP)
102 #ifdef HAVE_TPETRA_INST_FLOAT
103 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
float,
int, Kokkos::OpenMP)
105 #ifdef HAVE_TPETRA_INST_DOUBLE
106 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
double,
int, Kokkos::OpenMP)
108 #ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
109 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<float>,
int, Kokkos::OpenMP)
111 #ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
112 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<double>,
int, Kokkos::OpenMP)
114 #endif // KOKKOS_ENABLE_OPENMP
116 #if defined(KOKKOS_ENABLE_CUDA)
117 #ifdef HAVE_TPETRA_INST_FLOAT
118 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
float,
int, Kokkos::Cuda)
119 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER_UVM_OFF(
float,
int)
121 #ifdef HAVE_TPETRA_INST_DOUBLE
122 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(
double,
int, Kokkos::Cuda)
123 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER_UVM_OFF(
double,
int)
125 #ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
126 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<float>,
int, Kokkos::Cuda)
127 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER_UVM_OFF(Kokkos::complex<
float>,
int)
129 #ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
130 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER(Kokkos::complex<double>,
int, Kokkos::Cuda)
131 AMESOS2_KOKKOS_LOCAL_INSTANT_KOKKOS_ADAPTER_UVM_OFF(Kokkos::complex<
double>,
int)
133 #endif // KOKKOS_ENABLE_CUDA
135 #endif // AMESOS2_KOKKOS_IMPL_HPP
Amesos2::MultiVecAdapter specialization for the Kokkos::View class.