-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add align_extent(), to align extent but not min #5829
Conversation
This can be handy when you have an intermediate Func that is being tiled inside an outer Func and you want to ensure that it fits an exact multiple of tiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems OK to me, but @abadams should take a look. I'm not 100% sure that aligning bounds to a modulus without caring about the remainder should mean that the extent is a multiple of the modulus? But it does seem reasonable.
The within-compiler representation seems reasonable, but I think it would be better to change the API to be align_extent for this case (to mimic bound_extent) |
This ended up not being as useful as I thought it would be for my purposes. Adding |
Still not sure if this is genuinely needed, but moved to a separate method as suggested. |
I'm sure it will come up as useful at some point, and it's simple enough. |
This can be handy when you have an intermediate Func that is being tiled inside an outer Func and you want to ensure that it fits an exact multiple of tiles.