vec_mod
Purpose
Produces the remainders from dividing the elements of one vector by the corresponding elements of another vector, and places them in the result vector.
Note: This built-in function
is valid only when the -mcpu option is set to target Power10 processors.
Syntax
d=vec_mod(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 int | The same type as argument a |
| vector unsigned int | ||
| vector signed long long | ||
| vector unsigned long long |
Result value
Each element of d
is the remainder from dividing the corresponding element of
a by the
corresponding element of b.
Notes:
- When any element of
bis zero, the corresponding element ofdis undefined. - For signed arithmetic, when any element of
ais the negative number with maximum cardinality (for example, 0x8000,0000 for 32-bit signed integers), and the corresponding element ofbis negative one, the corresponding element ofdis undefined.