vec_sum4s
Purpose
Returns a vector containing the results of performing a sum across 1/4 vector operation on two given vectors.
Syntax
d=vec_sum4s(a, b)Result and argument types
The following table describes the types of the returned value and the function arguments.
| d | a | b |
|---|---|---|
| vector signed int | vector signed char | vector signed int |
| vector unsigned int | vector unsigned char | vector unsigned int |
| vector signed int | vector signed short | vector signed int |
Result value
For each element n of d, the value is obtained as follows:
- If
ais of typevector signed charorvector unsigned char, the value is the saturated addition of elements4nthrough4n+3ofaand elementnofb.d[0] = a[0] + a[1] + a[2] + a[3] + b[0] d[1] = a[4] + a[5] + a[6] + a[7] + b[1] d[2] = a[8] + a[9] + a[10] + a[11] + b[2] d[3] = a[12] + a[13] + a[14] + a[15] + b[3] - If
ais of typevector signed short, the value is the saturated addition of elements2nthrough2n+1ofaand elementnofb.d[0] = a[0] + a[1] + b[0] d[1] = a[2] + a[3] + b[1] d[2] = a[4] + a[5] + b[2] d[3] = a[6] + a[7] + b[3]