Conversation
| template<typename T> | ||
| auto PickValueInArray(T &array) -> decltype(auto) { | ||
| return array[ConsumeIntegralInRange(static_cast<std::size_t>(0), std::size(array) - 1)]; | ||
| auto PickValueInArray(const std::initializer_list<T> &list) -> decltype(auto) { |
There was a problem hiding this comment.
Why decltype(auto) instead of simply T? What does that even mean? it's already auto? The signature that exists is perfectly fine IMO.
mcourteaux
left a comment
There was a problem hiding this comment.
Nice. Why does git not detect the file moves? It's treating it as a full new file.
Co-authored-by: Andrew Adams <anadams@adobe.com>
|
A fuzzing failure: |
|
I decided to back out merging the random expression generators between simplify and lossless_cast. It started creeping too far in scope. The simplifier fixes we discovered along the way remain, of course. |
mcourteaux
left a comment
There was a problem hiding this comment.
LGTM, except one concern regarding simplifying 0 / 0, @abadams.
| rewrite(x / 1, x) || | ||
| rewrite(0 / x, 0) || | ||
| rewrite(x / 1, a) || | ||
| rewrite(0 / x, a) || |
There was a problem hiding this comment.
Not concerned about incorrectly simplifying and not generating NaN when x == 0? denominator_non_zero is not used here.
There was a problem hiding this comment.
No, this is correct for Halide integers, and it's not strict_div, so it's fair game for floats.
There was a problem hiding this comment.
Aha, I did miss the fact that we were inside an if-branch for integer types.
This PR moves the existing fuzz tests that were under test/correctness to test/fuzz, and integrates them into the fuzz test framework from #9050.
Checklist
performance.