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 |
|---|---|---|---|
The same type as argument a |
vector bool char | The same type as argument a |
vector unsigned char |
| vector signed char | |||
| vector unsigned char | |||
| vector bool short | |||
| vector signed short | |||
| vector unsigned short | |||
| vector pixel | |||
| vector bool int | |||
| vector signed int | |||
| vector unsigned int | |||
| vector bool long long | |||
| vector signed long long | |||
| vector unsigned long long | |||
| vector float | |||
| vector double |
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.