vec_neg

Purpose

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

Note: For vector signed long long, this function emulates the operation. This function requires the POWER7 architecture.

Syntax

d=vec_neg(a)

Result and argument types

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

d a
vector signed char vector signed char
vector signed short vector signed short
vector signed int vector signed int
vector signed long long vector signed long long
vector float vector float
vector double vector double

Result value

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