Skip to content

Commit

Permalink
Integrate review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Dec 7, 2023
1 parent 615c70b commit bd275da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/details/ArborX_DetailsHappyTreeFriends.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#ifndef ARBORX_DETAILS_HAPPY_TREE_FRIENDS_HPP
#define ARBORX_DETAILS_HAPPY_TREE_FRIENDS_HPP

#include <ArborX_DetailsNode.hpp>

#include <Kokkos_Macros.hpp>
#if KOKKOS_VERSION >= 40200
#include <Kokkos_Assert.hpp> // KOKKOS_ASSERT
Expand Down
2 changes: 1 addition & 1 deletion src/details/ArborX_DetailsLegacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LegacyValues

public:
using memory_space = typename Access::memory_space;
using value_type = Details::PairValueIndex<BoundingVolume>;
using value_type = Details::PairValueIndex<BoundingVolume, unsigned>;
using size_type =
Kokkos::detected_t<Details::AccessTraitsSizeArchetypeExpression, Access,
Primitives>;
Expand Down
8 changes: 4 additions & 4 deletions src/details/ArborX_IndexableGetter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ struct DefaultIndexableGetter
return geometry;
}

template <typename Value>
template <typename Value, typename Index>
KOKKOS_FUNCTION Value const &
operator()(PairValueIndex<Value> const &pair) const
operator()(PairValueIndex<Value, Index> const &pair) const
{
return pair.value;
}

template <typename Value>
KOKKOS_FUNCTION Value operator()(PairValueIndex<Value> &&pair) const
template <typename Value, typename Index>
KOKKOS_FUNCTION Value operator()(PairValueIndex<Value, Index> &&pair) const
{
return pair.value;
}
Expand Down
5 changes: 2 additions & 3 deletions src/details/ArborX_PairValueIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace ArborX::Details
{

template <class Value, typename Index = unsigned>
template <typename Value, typename Index = unsigned>
struct PairValueIndex
{
static_assert(std::is_integral_v<Index>);
Expand All @@ -38,7 +38,7 @@ class AttachIndices
Data _data;

using memory_space = typename Data::memory_space;
using value_type = Details::PairValueIndex<typename Data::value_type>;
using value_type = Details::PairValueIndex<typename Data::value_type, Index>;

AttachIndices(Values const &values)
: _data{values}
Expand All @@ -60,7 +60,6 @@ struct ArborX::AccessTraits<ArborX::Details::AttachIndices<Values, Index>,
using Self = ArborX::Details::AttachIndices<Values, Index>;

using memory_space = typename Self::memory_space;
using value_type = typename Self::value_type;

KOKKOS_FUNCTION static auto size(Self const &values) { return values.size(); }
KOKKOS_FUNCTION static decltype(auto) get(Self const &values, int i)
Expand Down

0 comments on commit bd275da

Please sign in to comment.