VEC_PERM(ARG1, ARG2, ARG3)

Purpose

Returns a vector that contains some elements of two vectors, in the order specified by a third vector.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) vector.
ARG2
An INTENT(IN) vector of the same type as ARG1.
ARG3
An INTENT(IN), UNSIGNED(1) vector.

Result type and attributes

The result is of the same type as ARG1.

Result value

Each byte of the result is selected by using the least significant 5 bits of the corresponding byte of ARG3 as an index into the concatenated bytes of ARG1 and ARG2.