vec_add
Purpose
Returns a vector containing the sums of each set of corresponding elements of the given vectors.
This function emulates the operation on long long vectors.
Syntax
d=vec_add(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 | ||
| vector signed char | vector bool char | vector signed char |
| vector signed char | vector bool char | |
| vector unsigned char | vector bool char | vector unsigned char |
| vector unsigned char | vector bool char | |
| vector signed short | vector bool short | vector signed short |
| vector signed short | vector bool short | |
| vector unsigned short | vector bool short | vector unsigned short |
| vector unsigned short | vector bool short | |
| vector signed int | vector bool int | vector signed int |
| vector signed int | vector bool int | |
| vector unsigned int | vector bool int | vector unsigned int |
| vector unsigned int | vector bool int |
Result value
The value of each element of
the result is the sum of the corresponding elements of a and b. For integer vectors and unsigned vectors, the arithmetic
is modular.