@@ -197,42 +197,48 @@ void magmaGesvWrapper(const ExecSpace& space, const AViewType& A, const BViewTyp
197
197
Kokkos::Profiling::popRegion ();
198
198
}
199
199
200
- #define KOKKOSLAPACK_GESV_MAGMA (SCALAR, LAYOUT, MEM_SPACE ) \
201
- template <> \
202
- struct GESV <Kokkos::Cuda, \
203
- Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
204
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
205
- Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
206
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
207
- Kokkos::View<magma_int_t *, LAYOUT, Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
208
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
209
- true , \
210
- gesv_eti_spec_avail<Kokkos::Cuda, \
211
- Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
212
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
213
- Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
214
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
215
- Kokkos::View<magma_int_t *, LAYOUT, \
216
- Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
217
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>>::value> { \
218
- using AViewType = Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
219
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
220
- using BViewType = Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEM_SPACE>, \
221
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
222
- using PViewType = \
223
- Kokkos::View<magma_int_t *, LAYOUT, Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
224
- Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
225
- \
226
- static void gesv (const Kokkos::Cuda& space, const AViewType& A, const BViewType& B, const PViewType& IPIV) { \
227
- magmaGesvWrapper (space, A, B, IPIV); \
228
- } \
200
+ #define KOKKOSLAPACK_GESV_MAGMA (SCALAR, LAYOUT, EXEC_SPACE, MEM_SPACE ) \
201
+ template <> \
202
+ struct GESV < \
203
+ EXEC_SPACE, \
204
+ Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
205
+ Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
206
+ Kokkos::View<magma_int_t *, LAYOUT, Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
207
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
208
+ true , \
209
+ gesv_eti_spec_avail< \
210
+ EXEC_SPACE, \
211
+ Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
212
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
213
+ Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
214
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
215
+ Kokkos::View<magma_int_t *, LAYOUT, Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
216
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>>::value> { \
217
+ using AViewType = Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
218
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
219
+ using BViewType = Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
220
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
221
+ using PViewType = \
222
+ Kokkos::View<magma_int_t *, LAYOUT, Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace>, \
223
+ Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
224
+ \
225
+ static void gesv (const EXEC_SPACE& space, const AViewType& A, const BViewType& B, const PViewType& IPIV) { \
226
+ magmaGesvWrapper (space, A, B, IPIV); \
227
+ } \
229
228
};
230
229
231
- KOKKOSLAPACK_GESV_MAGMA (float , Kokkos::LayoutLeft, Kokkos::CudaSpace)
232
- KOKKOSLAPACK_GESV_MAGMA (double , Kokkos::LayoutLeft, Kokkos::CudaSpace)
233
- KOKKOSLAPACK_GESV_MAGMA (Kokkos::complex<float >, Kokkos::LayoutLeft, Kokkos::CudaSpace)
234
- KOKKOSLAPACK_GESV_MAGMA (Kokkos::complex<double >, Kokkos::LayoutLeft, Kokkos::CudaSpace)
235
-
230
+ #if defined(KOKKOS_ENABLE_CUDA)
231
+ KOKKOSLAPACK_GESV_MAGMA (float , Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaSpace)
232
+ KOKKOSLAPACK_GESV_MAGMA(double , Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaSpace)
233
+ KOKKOSLAPACK_GESV_MAGMA(Kokkos::complex<float >, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaSpace)
234
+ KOKKOSLAPACK_GESV_MAGMA(Kokkos::complex<double >, Kokkos::LayoutLeft, Kokkos::Cuda, Kokkos::CudaSpace)
235
+ #endif
236
+ #if defined(KOKKOS_ENABLE_HIP)
237
+ KOKKOSLAPACK_GESV_MAGMA (float , Kokkos::LayoutLeft, Kokkos::HIP, Kokkos::HIPSpace)
238
+ KOKKOSLAPACK_GESV_MAGMA(double , Kokkos::LayoutLeft, Kokkos::HIP, Kokkos::HIPSpace)
239
+ KOKKOSLAPACK_GESV_MAGMA(Kokkos::complex<float >, Kokkos::LayoutLeft, Kokkos::HIP, Kokkos::HIPSpace)
240
+ KOKKOSLAPACK_GESV_MAGMA(Kokkos::complex<double >, Kokkos::LayoutLeft, Kokkos::HIP, Kokkos::HIPSpace)
241
+ #endif
236
242
} // namespace Impl
237
243
} // namespace KokkosLapack
238
244
#endif // KOKKOSKERNELS_ENABLE_TPL_MAGMA
0 commit comments