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

Stop @loop_* ranges being altered from inside loop #172

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

johnomotani
Copy link
Collaborator

Read the ranges out of the looping.loop_ranges variable into macro-local variables at the point where @loop_* is called. This means that if the region type is changed (changing looping.loop_ranges) inside the loop, the outer @loop_* does not change. This behaviour is a bit at odds with how Julia behaves with nested loops, but seems more natural if you think of an @loop_* statement as a single thing which should not change after you enter the block.

These are now required, as vz and vpa are separately defined dimensions.
Read the ranges out of the `looping.loop_ranges` variable into
macro-local variables at the point where `@loop_*` is called. This means
that if the region type is changed (changing `looping.loop_ranges`)
inside the loop, the outer `@loop_*` does not change. This behaviour is
a bit at odds with how Julia behaves with nested loops, but seems more
natural if you think of an `@loop_*` statement as a single thing which
should not change after you enter the block.
@johnomotani johnomotani merged commit d9dea96 into master Dec 16, 2023
14 of 16 checks passed
@johnomotani johnomotani deleted the looping-fix-ranges branch December 16, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant