Extensions for vector processing support

The vector extensions are only accepted when all of the following conditions are met:

  • The -mcpu option is set to a target architecture that supports vector processing instructions. For example, an architecture that supports the VSX instruction set extensions, such as POWER8®, requires -mcpu=pwr8.
  • The -qaltivec option is in effect.

Table 1. IBM XL C and C++ extensions to support the AltiVec Application Programming Interface specification
Language feature Discussed in:
Vector programming language extensions Vector types, Vector literals

The following features are IBM extensions to the AltiVec Application Programming Interface specification:

Table 2. IBM XL C and C++ extensions to the AltiVec Application Programming Interface specification
Language extension Discussed in:
__pixel, pixel, __vector, and vector keywords N/A
Indirection operator * applied to vector types N/A
Initialization of vectors Initialization of vectors
Pointer arithmetic on vector types Pointer arithmetic
Unary and binary operators Unary and binary operators
Vector types as arguments to vec_step The vec_step operator
Vector type casts Vector type casts
Vector subscripting operator [ ] Vector subscripting operator [ ]


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us