vec_sub
Purpose
Returns a vector containing the result of subtracting each element of b from the corresponding element of a.
This function emulates the operation on long long vectors.
This built-in function is valid only when you include the altivec.h file.
Syntax
d=vec_sub(a, b)
Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| The same type as argument a | vector signed char | The same type as argument a |
| vector unsigned char | ||
| vector signed short | ||
| vector unsigned short | ||
| vector signed int | ||
| vector unsigned int | ||
| vector signed long long | ||
| vector unsigned long long | ||
| vector float | ||
| vector double |
Result value
The value of each element of the result is the result of subtracting the value of the corresponding element of b from the value of the corresponding element of a. The arithmetic is modular for integer vectors.


