Constructs a vector with a in element position b.
d=vec_promote(a, b)
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| vector signed char | signed char | signed int |
| vector unsigned char | unsigned char | |
| vector signed short | signed short | |
| vector unsigned short | unsigned short | |
| vector signed int | signed int | |
| vector unsigned int | unsigned int | |
| vector signed long long | signed long long | |
| vector unsigned long long | unsigned long | |
| vector float | float | |
| vector double | 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. The other elements of the vector are undefined.