Skip to content

Commit

Permalink
Merge pull request #1114 from aprokop/exec_space_testing
Browse files Browse the repository at this point in the history
Fix execution spaces in the tests
  • Loading branch information
aprokop authored Jun 22, 2024
2 parents 7b4c57a + f7e7d8e commit 649d3a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/Search_UnitTestHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ auto make(ExecutionSpace const &exec_space, std::vector<ArborX::Box> const &b)
{
int const n = b.size();
Kokkos::View<ArborX::Box *, typename Tree::memory_space> boxes(
"Testing::boxes", n);
auto boxes_host = Kokkos::create_mirror_view(boxes);
Kokkos::view_alloc(Kokkos::WithoutInitializing, "Testing::boxes"), n);
auto boxes_host =
Kokkos::create_mirror_view(Kokkos::WithoutInitializing, boxes);
for (int i = 0; i < n; ++i)
boxes_host(i) = b[i];
Kokkos::deep_copy(boxes, boxes_host);
Kokkos::deep_copy(exec_space, boxes, boxes_host);
return Tree(exec_space, boxes);
}

Expand Down

0 comments on commit 649d3a7

Please sign in to comment.