Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor distributed query internals #1073

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aprokop
Copy link
Contributor

@aprokop aprokop commented Apr 19, 2024

  • Move common part from the spatial and nearest searches into forwardQueriesAndCommunicateResults
  • Do not sort ranks for spatial searches and the first phase of the nearest search (it is unnecessary)
  • Do not store and communicate values in the first phase of the nearest search; instead, only store the distances and communicate those
  • Use nth_element algorithm instead of priority queue for determining the farthest distance in the nearest first phase; only use distances in the algorithm instead of pairs of values and distances
  • Separated the code in the nearest queryDispatchImpl into phaseI and phaseII with interfaces making clear which data is passed where
  • Some minor general improvements

The overall goal of the PR is to prepare for reduce complexity. This should also help with the introduction of the nearest callbacks.

std::tuple_element_t<0, std::tuple<OtherViews...>>::rank == 1)
using ViewType = std::tuple_element_t<0, std::tuple<OtherViews...>>;
if constexpr (sizeof...(OtherViews) == 1 && ViewType::rank == 1 &&
std::is_arithmetic_v<typename ViewType::value_type>)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add this to not provide comparison operators for pair values.

@aprokop aprokop added the refactoring Code reorganization label Apr 19, 2024
@aprokop
Copy link
Contributor Author

aprokop commented May 2, 2024

I'd like to see this merged, as it is blocking more changes in the distributed framework. @masterleinad or @dalg24 can one of you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code reorganization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant