Skip to content

Convert pos_diff to NHS eltype if coordinates have a different eltype#132

Merged
svchb merged 7 commits intomainfrom
ef/coordinates-eltype
Nov 17, 2025
Merged

Convert pos_diff to NHS eltype if coordinates have a different eltype#132
svchb merged 7 commits intomainfrom
ef/coordinates-eltype

Conversation

@efaulhaber
Copy link
Copy Markdown
Member

No description provided.

@efaulhaber efaulhaber self-assigned this Oct 15, 2025
@efaulhaber efaulhaber added enhancement New feature or request gpu labels Oct 15, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.96%. Comparing base (5b86d44) to head (f2f33be).
⚠️ Report is 1 commits behind head on main.

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              
Flag Coverage Δ
unit 86.96% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@efaulhaber efaulhaber marked this pull request as ready for review October 31, 2025 17:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 eltype method for AbstractNeighborhoodSearch to retrieve the element type from the search radius
  • Converts pos_diff to match the neighborhood search's element type at three key locations
  • Adds @inbounds annotation to the extract_svector call in PrecomputedNeighborhoodSearch for 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.

@svchb svchb enabled auto-merge (squash) November 17, 2025 16:45
@svchb svchb merged commit d3472d2 into main Nov 17, 2025
12 checks passed
@svchb svchb deleted the ef/coordinates-eltype branch November 17, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gpu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants