Returns the value of element b from the vector a.
d=vec_extract(a, b)
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| signed char | vector signed char | signed int |
| unsigned char | vector unsigned char | |
| vector bool char | ||
| signed short | vector signed short | |
| unsigned short | vector unsigned short | |
| vector bool short | ||
| signed int | vector signed int | |
| unsigned int | vector unsigned int | |
| vector bool int | ||
| signed long long | vector signed long long | |
| unsigned long long | vector unsigned long long | |
| vector bool long long | ||
| float | vector float | |
| double | vector double |
This function uses the modulo arithmetic on b to determine the element number. For example, if b is out of range, the compiler uses b modulo the number of elements in the vector to determine the element position.