vec_absd

Purpose

Returns a vector that contains the absolute difference of the corresponding elements of the given vectors.

Note: This built-in function is valid only when the -mcpu option is set to target POWER9™ processors or higher.

Syntax

d=vec_absd(a, b)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Types of the returned value and the function arguments
d a b
vector unsigned char vector unsigned char vector unsigned char
vector unsigned short vector unsigned short vector unsigned short
vector unsigned int vector unsigned int vector unsigned int

Result value

The value of each element of the result is the absolute difference of the corresponding elements of a and b using the modulo arithmetic.