Skip to content

Commit

Permalink
Do not use things from namespace Kokkos::Impl (Kokkos::Impl::DeepCopy)
Browse files Browse the repository at this point in the history
Can achieve the same with Kokkos::deep_copy
  • Loading branch information
dalg24 committed Feb 2, 2024
1 parent 9331932 commit 0ed5a88
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sparse/impl/KokkosSparse_coo2crs_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,13 @@ class Coo2Crs {
reinterpret_cast<UmapType *>(Kokkos::kokkos_malloc<UmapMemorySpace>(
"m_umaps", m_nrows * sizeof(UmapType)));

using shallow_copy_to_device =
Kokkos::Impl::DeepCopy<UmapMemorySpace, typename Kokkos::HostSpace>;
auto shallow_copy_to_device = [](UmapType *dst, UmapType const *src,
std::size_t cnt) {
std::size_t n = cnt / sizeof(UmapType);
Kokkos::deep_copy(
Kokkos::View<UmapType *, UmapMemorySpace>(dst, n),
Kokkos::View<UmapType const *, Kokkos::HostSpace>(src, n));
};

UmapType **umap_ptrs = new UmapType *[m_nrows];
// TODO: use host-level parallel_for with tag rowmapRp1
Expand Down

0 comments on commit 0ed5a88

Please sign in to comment.