Vector built-in functions
Individual elements of vectors can be accessed by using the Vector Multimedia Extension (VMX) or the Vector Scalar Extension (VSX) built-in functions. This section provides an alphabetical reference to the VMX and the VSX 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. Built-in functions that use or return a vector unsigned long long, vector signed long long, vector bool long long, or vector double type require an architecture that supports the VSX instruction set extensions, such as POWER7®. You must specify an appropriate -qarch suboption, such as -qarch=pwr7, when you use these types.
Function syntax
This section uses pseudocode description to represent function syntax, as shown below:
d=func_name(a, b, c)
- d represents the return value of the function.
- a, b, and c represent the arguments of the function.
- func_name is the name of the function.
For example, the syntax for the function vector double vec_xld2(int, double*); is represented by d=vec_xld2(a, b).