Vector built-in functions

Individual elements of vectors can be accessed by using the Quad Processing Extension (QPX) built-in functions. This section provides an alphabetical reference to the QPX built-in functions. You can use these functions to manipulate vectors.

You must specify appropriate compiler options for your architecture when you use the built-in functions.

This section uses pseudocode description to represent function syntax, as shown below:

d=func_name(a, b, c)
In the description,

For example, the syntax for the function vector4double vec_add(vector4double, vector4double); is represented by d=vec_add(a, b).

Some built-in functions depend on the value of the floating-point status and control register (FPSCR). For information on the FPSCR, see FPSCR functions.

Floating-point operands for logical functions

In the quad vector logical functions, such as vec_and, floating-point operands are interpreted in the following ways:

In the result values, floating-point boolean values are as follows: