Closed alexreinking closed 2 days ago
Side note: we should (again) examine if we can move to C++20 for Halide 20. (Google has been at C++20 for a while now. Are there still blockers at Adobe?)
@abadams -- thanks for catching that! I went over all the other loops and they all have reverse_view
, as they should.
Nice cleanup. How complete is it? Did you already grep for all the rbegins/rends, or are there potentially more opportunities?
Nice cleanup. How complete is it? Did you already grep for all the rbegins/rends, or are there potentially more opportunities?
I grepped for size_t
and int
counter loop variables that had a - 1
or a >= 0
somewhere in there, too. I didn't try to convert loops that had peeled a first iteration.
I should look for rbegin
/rend
.
I made it through the new commit and didn't spot any issues.
Vulkan failures are unrelated
I found it very useful to backport
reverse_view
from C++20 for the sake of writing readable backwards loops. Here, I addreverse_view
toUtil.h
. This allows us to simplify code in a lot of places.