VEC_SRA(ARG1, ARG2)

Purpose

Performs an algebraic right shift for each element of a vector.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) integer vector or unsigned vector.
ARG2
An INTENT(IN) unsigned vector containing elements of the same kind as the elements of ARG1.

Result type and attributes

The result is of the same type as ARG1.

Result value

Each element of the result vector is the result of algebraically right shifting the corresponding element of ARG1 by the number of bits specified by the value of the corresponding element of ARG2, modulo the number of bits in the element. The bits that are shifted out are replaced by copies of the most significant bit of the element of ARG1.