VEC_SEL(ARG1, ARG2, ARG3)

Purpose

Selectively merges two vectors.

Class

Elemental function

Argument type and attributes

ARG1
INTENT(IN) integer vector, real vector, or unsigned vector.
ARG2
An INTENT(IN) vector of the same type as ARG1.
ARG3
An INTENT(IN) unsigned vector containing elements with the same kind as the elements of ARG1.

Result type and attributes

The result is of the same type as ARG1.

Result value

Each bit of the result vector has the value of the corresponding bit of ARG1 if the corresponding bit of ARG3 is 0, or the value of the corresponding bit of ARG2 otherwise.