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.

Table 1. Result and argument types
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 a is of the vector signed int or vector unsigned int type.
  • 64 bits if a is of the vector signed long long or vector unsigned long long type.
Notes:
  • When any element of b is zero, the corresponding element of d is undefined.
  • If any quotient cannot be represented in the element type of d , the corresponding element of d is undefined.