VEC_SUM4S(ARG1, ARG2)

Purpose

Returns a vector containing the results of performing a sum across 1/4 vector operation on the given vectors.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) INTEGER(1) vector, INTEGER(2) vector, or UNSIGNED(1) vector.
ARG2
An INTENT(IN) vector. If ARG1 is an integer vector, then ARG2 is an INTEGER(4) vector. If ARG1 is an unsigned vector, then ARG2 is an UNSIGNED(4) vector.

Result type and attributes

The result is a vector of the same type as ARG2.

Result value

Assume that the elements of each vector are numbered beginning with 0. If ARG1 is an INTEGER(1) vector or an UNSIGNED(1) vector, then let m be 4. Otherwise, let m be 2. For each element n of the result vector, the value is obtained by adding elements mn through mn+m-1 of ARG1 and element n of ARG2 using saturated addition.