You may find more details in the official ARM documentation for NEON.
The generic description for all comparison functions states:
If the comparison is true for a lane, the result in that lane is all bits set to one. If the comparison is false for a lane, all bits are set to zero. The return type is an unsigned integer type.
Suppose you have: (this is pseudo code, []
meaning the 8 values of each vector)
int8x8_t a = [-1, -1, -1, -1, 1, 1, 1, 1];
int8x8_t b = [ 0, 0, 0, 0, 0, 0, 0, 0];
uint8x8_t c = vclt_s8(a, b);
You'll get:
c = [255, 255, 255, 255, 0, 0, 0, 0];
The 4 first values of a
are less than the 4 first values of b
: all bits of the first 4 values of c
are set to 1
, making them 255
.
In the same way, all 4 last values are greater: all bits of the 4 last values of c
are set to 0, making them 0
.
Hope this helps!