vec_sel
Purpose
Returns a vector containing the value of either a or b depending on the value of c.
Syntax
d=vec_sel(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 b | The same type as argument b | vector bool char | vector bool char |
vector unsigned char | |||
vector signed char | vector bool char | ||
vector unsigned char | |||
vector unsigned char | vector bool char | ||
vector unsigned char | |||
vector bool short | vector bool short | ||
vector unsigned short | |||
vector signed short | vector bool shot | ||
vector unsigned short | |||
vector unsigned short | vector bool short | ||
vector unsigned short | |||
vector bool int | vector bool int | ||
vector unsigned int | |||
vector signed int | vector bool int | ||
vector unsigned int | |||
vector unsigned int | vector bool int | ||
vector unsigned int | |||
vector bool long long | vector bool long long | ||
vector unsigned long long | |||
vector signed long long | vector bool long long | ||
vector unsigned long long | |||
vector unsigned long long | vector bool long long | ||
vector unsigned long long | |||
vector float | vector bool int | ||
vector unsigned int | |||
vector double | vector bool long long | ||
vector unsigned long long |
Result value
Each bit of the result vector has the value of the corresponding bit of a if the corresponding bit of c is 0, or the value of the corresponding bit of b otherwise.