Skip to content

Commit

Permalink
[Hotfix] Fix boundscheck for foreach_point_neighbor (#95)
Browse files Browse the repository at this point in the history
* [Hotfix] Fix boundscheck for `foreach_point_neighbor`

* Increase version number
  • Loading branch information
efaulhaber authored Jan 16, 2025
1 parent 16b5269 commit 88925f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PointNeighbors"
uuid = "1c4d5385-0a27-49de-8e2c-43b175c8985c"
authors = ["Erik Faulhaber <[email protected]>"]
version = "0.4.7-dev"

This comment has been minimized.

Copy link
@efaulhaber

efaulhaber Jan 16, 2025

Author Member
version = "0.4.7"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
6 changes: 3 additions & 3 deletions src/neighborhood_search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ end
@inline function foreach_point_neighbor(f, system_coords, neighbor_coords,
neighborhood_search, points, parallel::Val{true})
# Explicit bounds check before the hot loop (or GPU kernel)
@boundscheck checkbounds(system_coords, ndims(neighborhood_search))
@boundscheck checkbounds(system_coords, ndims(neighborhood_search), points)

@threaded system_coords for point in points
# Now we can assume that `point` is inbounds
Expand All @@ -181,7 +181,7 @@ end
neighborhood_search, points,
backend::ParallelizationBackend)
# Explicit bounds check before the hot loop (or GPU kernel)
@boundscheck checkbounds(system_coords, ndims(neighborhood_search))
@boundscheck checkbounds(system_coords, ndims(neighborhood_search), points)

@threaded backend for point in points
# Now we can assume that `point` is inbounds
Expand All @@ -195,7 +195,7 @@ end
@inline function foreach_point_neighbor(f, system_coords, neighbor_coords,
neighborhood_search, points, parallel::Val{false})
# Explicit bounds check before the hot loop
@boundscheck checkbounds(system_coords, ndims(neighborhood_search))
@boundscheck checkbounds(system_coords, ndims(neighborhood_search), points)

for point in points
# Now we can assume that `point` is inbounds
Expand Down

1 comment on commit 88925f9

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/123141

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.7 -m "<description of version>" 88925f9d91615bb2d62e82048e31004c5f54e200
git push origin v0.4.7

Please sign in to comment.