Skip to content

Commit

Permalink
Renaming external predicates / callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlag31 committed Dec 27, 2023
1 parent 5ad0a44 commit 620ac7e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/interpolation/ArborX_InterpMovingLeastSquares.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ namespace ArborX::Interpolation::Details

// This is done to avoid a clash with another predicates access trait
template <typename TargetAccess>
struct MLSTargetPointsPredicateWrapper
struct MLSPredicateWrapper
{
TargetAccess target_access;
int num_neighbors;
};

// Functor used in the tree query to create the 2D source view and indices
template <typename SourceView, typename IndicesView, typename CounterView>
struct SearchNeighborsCallback
struct MLSSearchNeighborsCallback
{
SourceView source_view;
IndicesView indices;
Expand All @@ -67,12 +67,10 @@ namespace ArborX
{

template <typename TargetAccess>
struct AccessTraits<
Interpolation::Details::MLSTargetPointsPredicateWrapper<TargetAccess>,
PredicatesTag>
struct AccessTraits<Interpolation::Details::MLSPredicateWrapper<TargetAccess>,
PredicatesTag>
{
using Self =
Interpolation::Details::MLSTargetPointsPredicateWrapper<TargetAccess>;
using Self = Interpolation::Details::MLSPredicateWrapper<TargetAccess>;

KOKKOS_FUNCTION static auto size(Self const &tp)
{
Expand Down Expand Up @@ -233,8 +231,8 @@ class MovingLeastSquares
source_tree(space, ArborX::Experimental::attach_indices(source_access));

// Create the predicates
Details::MLSTargetPointsPredicateWrapper<TargetAccess> predicates{
target_access, _num_neighbors};
Details::MLSPredicateWrapper<TargetAccess> predicates{target_access,
_num_neighbors};

// Create the callback
Kokkos::View<SourcePoint **, MemorySpace> source_view(
Expand All @@ -247,8 +245,8 @@ class MovingLeastSquares
_num_targets, _num_neighbors);
Kokkos::View<int *, MemorySpace> counter(
"ArborX::MovingLeastSquares::counter", _num_targets);
Details::SearchNeighborsCallback<decltype(source_view), decltype(_indices),
decltype(counter)>
Details::MLSSearchNeighborsCallback<decltype(source_view),
decltype(_indices), decltype(counter)>
callback{source_view, _indices, counter};

// Query the source tree
Expand Down

0 comments on commit 620ac7e

Please sign in to comment.