vec_dive
Purpose
Divides the left-shifted elements of one vector by the corresponding elements of another vector and places the quotients in the target vector.
Note: This built-in function
is valid only when the -mcpu option is set to target Power10 processors.
Syntax
d=vec_dive(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
The value of each element of
d
is obtained by shifting the corresponding element of
a left by the element
size in bits, and then dividing that value by the corresponding element of b. The shift amount is as
follows:- 32 bits if
ais of the vectorsigned intor vectorunsigned inttype. - 64 bits if
ais of the vectorsigned long longor vectorunsigned long longtype.
Notes:
- When any element of
bis zero, the corresponding element ofdis undefined. - If any quotient cannot be represented in the element type of
d, the corresponding element ofdis undefined.