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

Fix wrong looping over indices of OffsetArray #2816

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

navidcy
Copy link
Collaborator

@navidcy navidcy commented Nov 9, 2022

@navidcy navidcy changed the title Fix potentially dangerous behaviour with inbounds Fix potentially dangerous behaviour with @inbounds Nov 9, 2022
@glwagner
Copy link
Member

glwagner commented Nov 9, 2022

The docs link is broken. What does it say?

@navidcy
Copy link
Collaborator Author

navidcy commented Nov 9, 2022

The docs link is broken. What does it say?

Fixed

@glwagner
Copy link
Member

glwagner commented Nov 9, 2022

Ah I see. That advice is about writing generic code, but we don't need that here.

@navidcy navidcy requested a review from glwagner November 9, 2022 23:08
@navidcy navidcy added the bug 🐞 Even a perfect program still has bugs label Nov 9, 2022
@navidcy navidcy changed the title Fix potentially dangerous behaviour with @inbounds Fix wrong looping over indices of OffsetArray Nov 9, 2022
@navidcy navidcy merged commit 00b6a85 into main Nov 10, 2022
@navidcy navidcy deleted the ncc/avoid-dangerous-inbounds branch November 10, 2022 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Even a perfect program still has bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dangerous behavior with @inbounds within for loop over 1:lenght(ξ::OffSetArray)
2 participants