vec_neg

Purpose

Returns a vector containing the negated value of the corresponding elements in the given vector.

Note: For vector signed long long, this function emulates the operation. This built-in function is valid only when -qarch is set to target POWER7® processors or higher.

Syntax

d=vec_neg(a)

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
The same type as argument a vector signed char
vector signed short
vector signed int
vector signed long long
vector float
vector double

Result value

This function multiplies the value of each element in the given vector by -1.0 and then assigns the result to the corresponding elements in the result vector.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us