vec_perm
Purpose
Returns a vector that contains some elements of two vectors, in the order specified by a third vector.
Syntax
d=vec_perm(a, b, c)
Result and argument types
The following table describes the types of the returned value and the function arguments.
d | a | b | c |
---|---|---|---|
vector signed int | vector signed int | vector signed int | vector unsigned char |
vector unsigned int | vector unsigned int | vector unsigned int | |
vector bool int | vector bool int | vector bool int | |
vector signed short | vector signed short | vector signed short | |
vector unsigned short | vector unsigned short | vector unsigned short | |
vector bool short | vector bool short | vector bool short | |
vector pixel | vector pixel | vector pixel | |
vector signed char | vector signed char | vector signed char | |
vector unsigned char | vector unsigned char | vector unsigned char | |
vector bool char | vector bool char | vector bool char | |
vector float | vector float | vector float | |
vector double | vector double | vector double | |
vector signed long long | vector signed long long | vector signed long long | |
vector unsigned long long | vector unsigned long long | vector unsigned long long |
Result value
Each byte of the result is selected by using the least significant five bits of the corresponding byte of c as an index into the concatenated bytes of a and b.