vec_promote: Vector Promote

d = vec_promote(a, b)

Returns a vector with a in element position b. The result is a vector with a in element position b. This function uses 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.

Table 1. Vector Promote
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 long
vector double double