vec_sel

Purpose

Selectively merges two vectors.

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
vector bool char vector bool char vector bool char vector bool char
vector unsigned char
vector signed char vector signed char vector signed char vector bool char
vector unsigned char
vector unsigned char vector unsigned char vector unsigned char vector bool char
vector unsigned char
vector bool short vector bool short vector bool short vector bool short
vector unsigned short
vector signed short vector signed short vector signed short vector bool shot
vector unsigned short
vector unsigned short vector unsigned short vector unsigned short vector bool short
vector unsigned short
vector bool int vector bool int vector bool int vector bool int
vector unsigned int
vector signed int vector signed int vector signed int vector bool int
vector unsigned int
vector unsigned int vector unsigned int vector unsigned int vector bool int
vector unsigned int
vector bool long long vector bool long long vector bool long long vector bool long long
vector unsigned long long
vector signed long long vector signed long long vector signed long long vector bool long long
vector unsigned long long
vector unsigned long long vector unsigned long long vector unsigned long long vector bool long long
vector unsigned long long
vector float vector float vector float vector bool int
vector unsigned int
vector double vector double 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.