vec_first_mismatch_index
Purpose
Compares each set of the corresponding elements of the given vectors and returns the first position of inequality.
Note: This built-in function
is valid only when the -mcpu option is set to target POWER9 processors
or higher.
Syntax
d=vec_first_mismatch_index(a, b)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| unsigned int | vector signed char | vector signed char |
| unsigned int | vector unsigned char | vector unsigned char |
| unsigned int | vector signed short | vector signed short |
| unsigned int | vector unsigned short | vector unsigned short |
| unsigned int | vector signed int | vector signed int |
| unsigned int | vector unsigned int | vector unsigned int |
Result value
Returns the byte index of the position of the first unequal element between a and b. If all the corresponding elements are equal
between a and b, returns the number of the
elements of either a or
b.