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.

Table 1. 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 b is zero, the corresponding element of d is undefined.
  • For signed arithmetic, when any element of a is the negative number with maximum cardinality (for example, 0x8000,0000 for 32-bit signed integers), and the corresponding element of b is negative one, the corresponding element of d is undefined.