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

BUG: skip out-of-bounds particles in ngp deposition #4604

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

neutrinoceros
Copy link
Member

PR Summary

close #4603

I'm not 100% sure this is the right fix (in particular, I'm not sure if a similar check for i < 0 and j < 0 would be useful), though it does fix the issue and I'm not seeing any performance regression with my very unscientific benchmark.

matthewturk
matthewturk previously approved these changes Jul 27, 2023
Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

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

Looks good! If it's -1 it won't error out because we aren't disallowing wraparound, so it will not error but won't give the right answer. If we disabled wraparound but not boundscheck it should show up.

@neutrinoceros
Copy link
Member Author

I'm confused. If we're not disallowing wraparounds, why is it erroring now ? Is "wraparound" only for negative indices ?

@matthewturk
Copy link
Member

That was my understanding.

@neutrinoceros
Copy link
Member Author

I see. Then how about we disallow it and add the corresponding checks while we're at it ?

@matthewturk
Copy link
Member

matthewturk commented Jul 27, 2023 via email

@neutrinoceros
Copy link
Member Author

there you go

@neutrinoceros neutrinoceros marked this pull request as ready for review July 27, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: out-of-bounds memory access when trying to zoom on a ParticleProjectionPlot
3 participants