VEC_PACKS(ARG1, ARG2)

Purpose

Packs information from each element of two vectors into the result vector, using saturated values.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) integer vector or unsigned vector whose elements are of kind 2 or 4.
ARG2
An INTENT(IN) vector of the same type as ARG1.

Result type and attributes

If ARG1 is an INTEGER(2) vector, then the result is an INTEGER(1) vector.

If ARG1 is an INTEGER(4) vector, then the result is an INTEGER(2) vector.

If ARG1 is an UNSIGNED(2) vector, then the result is an UNSIGNED(1) vector.

If ARG1 is an UNSIGNED(4) vector, then the result is an UNSIGNED(2) vector.

Result value

The value of each element of the result vector is the saturated value of the corresponding element of the result of concatenating ARG1 and ARG2.