You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Fix operator- for sycl::vec<bool, N> (#11816)
Since bool vectors have a backing storage of chars, the unary minus
operator was in fact producing `(char)-1`, and thus not adhering to the
ABI where bools should be either 0 or 1.
This could manifest itself in bugs, for instance where the "bool"
elements wouldn't compare equal to other bools, such as those in arrays.
This only manifested itself in device code (possibly because the array
of bools is also an array of bytes under the hood), hence the test case
that differs in style somewhat from the rest.
0 commit comments