d = vec_find_any_eq_idx_cc(a, b, c)
Find the lowest byte-index of element of a from any element of b with an 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 |
vector unsigned int a = {1, 2, 3, 4};
vector unsigned int b = {5, 3, 7, 8};
int c = 0;
vector unsigned int d = vec_find_any_eq_idx_cc(a,b,&c); // byte 7 of d = 8, c = 1
In
this example, the third element (byte index 8) of a was
found in the vector b.vector unsigned int a = {1, 2, 3, 4};
vector unsigned int b = {5, 6, 7, 8};
int c = 0;
vector unsigned int d = vec_find_any_eq_idx_cc(a,b,&c); // byte 7 of d = 16, c = 3
In this example, the no element from a was
found in b, so 16 is returned.