From 6320774080e3c5a6f0bba719c1e292d30cfe1648 Mon Sep 17 00:00:00 2001 From: Andrey Prokopenko Date: Tue, 24 Oct 2023 09:36:05 -0400 Subject: [PATCH] Change Indexables to operate on array-like Values --- src/ArborX_LinearBVH.hpp | 4 ++-- src/details/ArborX_IndexableGetter.hpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ArborX_LinearBVH.hpp b/src/ArborX_LinearBVH.hpp index ff83fcb1e7..7e93d46e9f 100644 --- a/src/ArborX_LinearBVH.hpp +++ b/src/ArborX_LinearBVH.hpp @@ -225,8 +225,8 @@ BasicBoundingVolumeHierarchy indexables{user_values, - indexable_getter}; + Details::Indexables indexables{ + values, indexable_getter}; Kokkos::Profiling::pushRegion( "ArborX::BVH::BVH::calculate_scene_bounding_box"); diff --git a/src/details/ArborX_IndexableGetter.hpp b/src/details/ArborX_IndexableGetter.hpp index 0cee616b99..d109ba655f 100644 --- a/src/details/ArborX_IndexableGetter.hpp +++ b/src/details/ArborX_IndexableGetter.hpp @@ -52,15 +52,14 @@ struct Indexables Values _values; IndexableGetter _indexable_getter; - using Access = AccessTraits; - using memory_space = typename Access::memory_space; + using memory_space = typename Values::memory_space; KOKKOS_FUNCTION decltype(auto) operator()(int i) const { - return _indexable_getter(Access::get(_values, i)); + return _indexable_getter(_values(i)); } - KOKKOS_FUNCTION auto size() const { return Access::size(_values); } + KOKKOS_FUNCTION auto size() const { return _values.size(); } }; } // namespace ArborX::Details