Skip to content

Commit

Permalink
Do WithoutInitializing when resizing output view in CrsGraph
Browse files Browse the repository at this point in the history
This is important for types that are not default constructible.
  • Loading branch information
aprokop committed May 8, 2024
1 parent 8073b82 commit 5b1946c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp
Expand Up @@ -217,7 +217,8 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree,
// Exit early if either no results were found for any of the queries, or
// nothing was inserted inside a callback for found results. This check
// guarantees that the second pass will not be executed.
Kokkos::resize(out, 0);
Kokkos::resize(Kokkos::view_alloc(space, Kokkos::WithoutInitializing), out,
0);
// FIXME: do we need to reset offset if it was preallocated here?
Kokkos::Profiling::popRegion();
return;
Expand Down

0 comments on commit 5b1946c

Please sign in to comment.