VEC_MRADDS(ARG1, ARG2, ARG3)

Purpose

Returns a vector containing the results of performing a saturated multiply-high-round-and-add operation for each corresponding set of elements of the given vectors.

Class

Elemental function

Argument type and attributes

ARG1
An INTENT(IN) INTEGER(2) vector.
ARG2
An INTENT(IN) vector of the same type as ARG1.
ARG3
An INTENT(IN) vector of the same type as ARG1.

Result type and attributes

The result is of the same type as ARG1.

Result value

For each element of the result, the value is produced in the following way: The values of the corresponding elements of ARG1 and ARG2 are multiplied and rounded such that the 15 least significant bits are 0. The value of the 17 most significant bits of this rounded product is then added, using 16-bit-saturated addition, to the value of the corresponding element of ARG3.