VEC_SR(ARG1, ARG2)
Purpose
Performs a right shift for each element of a vector.
Class
Elemental function
Argument type and attributes
- ARG1
- An INTENT(IN) integer or unsigned vector.
- ARG2
- An INTENT(IN) unsigned vector containing elements of the same kind as the elements of ARG1.
Note: When you
call VEC_SR, the following types are valid only when -qarch is
set to target POWER8 processors:
- ARG1 is an INTENT(IN) vector of INTEGER(8) or UNSIGNED(8), and
- ARG2 is an INTENT(IN) vector of UNSIGNED(8).
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 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 zeros.