From 60877b399d958cc6c928ddd842dd36d2e933b6db Mon Sep 17 00:00:00 2001 From: Ana Gainaru Date: Wed, 29 Mar 2023 22:51:22 -0400 Subject: [PATCH] Allowing ADIOS2 to receive Kokkos::View with HIP backend --- bindings/CXX11/adios2/cxx11/KokkosView.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bindings/CXX11/adios2/cxx11/KokkosView.h b/bindings/CXX11/adios2/cxx11/KokkosView.h index 70aea00e8d..1d0e70b12a 100644 --- a/bindings/CXX11/adios2/cxx11/KokkosView.h +++ b/bindings/CXX11/adios2/cxx11/KokkosView.h @@ -39,6 +39,26 @@ struct memspace_kokkos_to_adios2 #endif +#if defined(KOKKOS_ENABLE_HIP) && defined(ADIOS2_HAVE_GPU_SUPPORT) +template <> +struct memspace_kokkos_to_adios2 +{ + static constexpr adios2::MemorySpace value = adios2::MemorySpace::GPU; +}; + +template <> +struct memspace_kokkos_to_adios2 +{ + static constexpr adios2::MemorySpace value = adios2::MemorySpace::GPU; +}; + +template <> +struct memspace_kokkos_to_adios2 +{ + static constexpr adios2::MemorySpace value = adios2::MemorySpace::GPU; +}; +#endif + } // namespace detail template