vec_cmpeq

Purpose

Returns a vector containing the results of comparing each set of corresponding elements of the given vectors for equality.

This function emulates the operation on long long vectors.

Note: This built-in function is valid only when you specify the -qaltivec option and include the altivec.h file.

Syntax

d=vec_cmpeq(a, b)

Result and argument types

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

Table 1. Result and argument types
d a b
vector bool char vector bool char The same type as argument a
vector signed char
vector unsigned char
vector bool short vector bool short
vector signed short
vector unsigned short
vector bool int vector bool int
vector signed int
vector unsigned int
vector float
vector bool long long vector bool long long
vector signed long long
vector unsigned long long
vector double

Result value

For each element of the result, the value of each bit is 1 if the corresponding elements of a and b are equal. Otherwise, the value of each bit is 0.