VEC_MSUMS(ARG1, ARG2, ARG3)

Purpose

Returns a vector containing the results of performing a saturated multiply-sum operation using the given vectors.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) INTEGER(2) vector or UNSIGNED(2) vector.
ARG2
An INTENT(IN) vector of the same type as ARG1.
ARG3
An INTENT(IN) vector. If ARG1 is an integer vector, then ARG3 is an INTEGER(4) vector. If ARG1 is an unsigned vector, then ARG3 is an UNSIGNED(4) vector.

Result type and attributes

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

Result value

Assume that the elements of each vector are numbered beginning with 0. For each element n of the result vector, the value is obtained in the following way: For p = 2n to 2n+1, multiply element p of ARG1 by element p of ARG2. Add the sum of these products to element n of ARG3. All additions are performed using 32-bit saturated arithmetic.