Skip to content

Commit

Permalink
Modify conditions on memory spaces in Distributor
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Oct 6, 2024
1 parent 2e7ef7b commit 9b604d6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/distributed/detail/ArborX_Distributor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <ArborX_Config.hpp>

#include <kokkos_ext/ArborX_KokkosExtAccessibilityTraits.hpp>
#include <kokkos_ext/ArborX_KokkosExtMinMaxReduce.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>
#include <misc/ArborX_Exception.hpp>
Expand Down Expand Up @@ -279,6 +280,15 @@ class Distributor
Kokkos::Profiling::ScopedRegion guard(
"ArborX::Distributor::doPostsAndWaits");

static_assert(
KokkosExt::is_accessible_from<typename ExportView::memory_space,
ExecutionSpace>::value);
static_assert(
KokkosExt::is_accessible_from<typename ImportView::memory_space,
ExecutionSpace>::value);
static_assert(
KokkosExt::is_accessible_from<typename decltype(_permute)::memory_space,
ExecutionSpace>::value);
static_assert(ExportView::rank == 1 &&
(std::is_same_v<typename ExportView::array_layout,
Kokkos::LayoutLeft> ||
Expand All @@ -290,12 +300,6 @@ class Distributor
std::is_same_v<typename ImportView::array_layout,
Kokkos::LayoutRight>));

using MemorySpace = typename ExportView::memory_space;
static_assert(
std::is_same_v<MemorySpace, typename ImportView::memory_space>);
static_assert(
std::is_same_v<MemorySpace, typename decltype(_permute)::memory_space>);

using ValueType = typename ImportView::value_type;
static_assert(
std::is_same<ValueType,
Expand Down

0 comments on commit 9b604d6

Please sign in to comment.