Convert pos_diff to NHS eltype if coordinates have a different eltype#132
Convert pos_diff to NHS eltype if coordinates have a different eltype#132
pos_diff to NHS eltype if coordinates have a different eltype#132Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #132 +/- ##
==========================================
+ Coverage 86.94% 86.96% +0.01%
==========================================
Files 15 15
Lines 659 660 +1
==========================================
+ Hits 573 574 +1
Misses 86 86
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ixiNeighborhoodSearch.jl into ef/coordinates-eltype
There was a problem hiding this comment.
Pull Request Overview
This PR adds type conversion for position differences to ensure consistent numerical precision throughout neighborhood search operations, and optimizes the precomputed neighborhood search with @inbounds annotation.
- Adds a new
eltypemethod forAbstractNeighborhoodSearchto retrieve the element type from the search radius - Converts
pos_diffto match the neighborhood search's element type at three key locations - Adds
@inboundsannotation to theextract_svectorcall inPrecomputedNeighborhoodSearchfor a ~20% GPU speedup
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/neighborhood_search.jl | Defines eltype method for AbstractNeighborhoodSearch and applies type conversion to pos_diff in generic foreach_neighbor |
| src/nhs_grid.jl | Applies type conversion to pos_diff in GridNeighborhoodSearch's specialized foreach_neighbor |
| src/nhs_precomputed.jl | Applies type conversion to pos_diff and adds @inbounds annotation with updated safety comment in PrecomputedNeighborhoodSearch's foreach_neighbor |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.