VEC_MLADD(ARG1, ARG2, ARG3)

Purpose

Returns a vector containing the results of performing a saturated multiply-low-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 or UNSIGNED(2) vector.
ARG2
An INTENT(IN) INTEGER(2) vector or UNSIGNED(2) vector.
ARG3
An INTENT(IN) vector of the same type as ARG2.

Result type and attributes

If ARG1, ARG2, and ARG3 are all unsigned vectors, then the result is an UNSIGNED(2) vector. Otherwise, the result is an INTEGER(2) vector.

Result value

The value of each element of the result is the value of the least significant 16 bits of the product of the values of the corresponding elements of ARG1 and ARG2, added to the value of the corresponding element of ARG3.

The addition is performed using modular arithmetic.