Skip to content

Commit

Permalink
Use execution_space with view_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Aug 15, 2023
1 parent e8569ca commit d364060
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/triangle_intersection/triangle_intersection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class Points
{
_points = Kokkos::View<ArborX::ExperimentalHyperGeometry::Point<2> *,
MemorySpace>(
Kokkos::view_alloc(Kokkos::WithoutInitializing, "points"), 2 * n);
Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing,
"points"),
2 * n);

Kokkos::parallel_for(
Kokkos::MDRangePolicy<Kokkos::Rank<2>, ExecutionSpace>(
Expand Down Expand Up @@ -144,9 +146,13 @@ class Triangles
{
_triangles = Kokkos::View<ArborX::ExperimentalHyperGeometry::Triangle<2> *,
MemorySpace>(
Kokkos::view_alloc(Kokkos::WithoutInitializing, "triangles"), 2 * n);
Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing,
"triangles"),
2 * n);
_mappings = Kokkos::View<Mapping *, MemorySpace>(
Kokkos::view_alloc(Kokkos::WithoutInitializing, "mappings"), 2 * n);
Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing,
"mappings"),
2 * n);

Kokkos::parallel_for(
Kokkos::MDRangePolicy<Kokkos::Rank<2>, ExecutionSpace>(
Expand Down

0 comments on commit d364060

Please sign in to comment.