vec_find_any_ne_idx_cc: Vector Find Any Element Not Equal Index with Condition Code
d = vec_find_any_ne_idx_cc(a, b, c)
Find the lowest byte-index of element of a from any element of b with a not equal value. If it is found, the result is the lowest byte-index from element of a, and c is set to 1. Otherwise, the result is 16, with c set to 3.
The result is placed into byte element seven of the returned vector, and all other bytes are set to 0.
d | a | b | c |
---|---|---|---|
vector signed char | vector signed char | vector signed char | int * |
vector unsigned char | vector bool char | vector bool char | |
vector unsigned char | vector unsigned char | ||
vector signed short | vector signed short | vector signed short | |
vector unsigned short | vector bool short | vector bool short | |
vector unsigned short | vector unsigned short | ||
vector signed int | vector signed int | vector signed int | |
vector unsigned int | vector bool int | vector bool int | |
vector unsigned int | vector unsigned int |
Example 1:
vector unsigned int a = {1, 2, 3, 4};
vector unsigned int b = {1, 5, 3, 4};
int c = 0;
vector unsigned int d = vec_find_any_ne_idx_cc(a,b,&c); // byte 7 of d = 4, c = 1
In
this example, the second element (byte index 4) of a was
found to be not equal to any element in the vector b.Example
2:
vector unsigned int a = {1, 2, 3, 4};
vector unsigned int b = {1, 2, 3, 4};
int c = 0;
vector unsigned int d = vec_find_any_ne_idx_cc(a,b,&c); // byte 7 of d = 16, c = 3