From d3640600018b8eb7c11e87e1c937465f05b2a20a Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 15 Aug 2023 10:42:04 -0400 Subject: [PATCH] Use execution_space with view_alloc --- .../triangle_intersection/triangle_intersection.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/triangle_intersection/triangle_intersection.cpp b/examples/triangle_intersection/triangle_intersection.cpp index 7f85a8356..92a86a14c 100644 --- a/examples/triangle_intersection/triangle_intersection.cpp +++ b/examples/triangle_intersection/triangle_intersection.cpp @@ -104,7 +104,9 @@ class Points { _points = Kokkos::View *, MemorySpace>( - Kokkos::view_alloc(Kokkos::WithoutInitializing, "points"), 2 * n); + Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing, + "points"), + 2 * n); Kokkos::parallel_for( Kokkos::MDRangePolicy, ExecutionSpace>( @@ -144,9 +146,13 @@ class Triangles { _triangles = Kokkos::View *, MemorySpace>( - Kokkos::view_alloc(Kokkos::WithoutInitializing, "triangles"), 2 * n); + Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing, + "triangles"), + 2 * n); _mappings = Kokkos::View( - Kokkos::view_alloc(Kokkos::WithoutInitializing, "mappings"), 2 * n); + Kokkos::view_alloc(execution_space, Kokkos::WithoutInitializing, + "mappings"), + 2 * n); Kokkos::parallel_for( Kokkos::MDRangePolicy, ExecutionSpace>(