vec_first_match_or_eos_index
Purpose
Compares each set of the corresponding elements of the given vectors and returns the first position of equality or the position of the end-of-string terminator \0.
This built-in function is valid only when -qarch(-mcpu) is set to utilize the POWER9™ technology and the altivec.h file is included.
Syntax
d=vec_first_match_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 equal element between a and b or the position of an end-of-string terminator, \0.
If both of the following
conditions are met,
- There is no equality between the corresponding elements of a and b;
- There is no end-of-string terminator;