Extensions for vector processing support

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

  • The -qarch 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 POWER7®, requires -qarch=pwr7.
  • The -qaltivec option is in effect.

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

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

Table 2. IBM XL C extensions to the AltiVec Application Programming Interface specification
Language extension Discussed in:
Address operator & and Indirection operator * applied to vector types Address operator &, Indirection operator *
bool, __pixel, pixel, __vector, and vector keywords Keywords for language extensions (IBM extension)
Initialization of vectors Initialization of vectors (IBM extension)
Pointer arithmetic for vector types Pointer arithmetic
vector types as arguments to the __alignof__, typeof, sizeof, and vec_step The __alignof__ operator (IBM extension), The typeof operator (IBM extension), The sizeof operator, The vec_step operator (IBM extension)
Vector type casts Type conversions
Vector subscripting operator [ ] Vector subscripting operator [ ] (IBM extension)


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