Comment on
|
d = _mm_or_si128(d, _mm_and_si128(tmp, _mm_set1_epi8(0x08))); // d = a > 0? 1<<3 : 0 |
(and similar comments below) should read
d |= a > 0? 1<<3 : 0
instead of
d = a > 0? 1<<3 : 0
.
Furthermore on
|
d = _mm_or_si128(d, _mm_andnot_si128(tmp, _mm_set1_epi8(0x08))); // d = a > 0? 1<<3 : 0 |
it should be
d |= a >= 0? 1<<3 : 0
instead of
d = a > 0? 1<<3 : 0
(note
>=
instead of
>
).