Language element control

Pragma equivalent



For a runtime environment that supports vector instructions, this option can be specified to control whether the compiler enables the vector programming support and automatically takes advantage of vector instructions.


Read syntax diagramSkip visual syntax diagramNOVECTORVECTOR(,NOTYPENOAUTOSIMDTYPEAUTOSIMD)



The default is as follows, if neither LANGLVL(STRICT98) nor LANGLVL(ANSI) is in effect:
  • VECTOR(NOTYPE, AUTOSIMD) when all of the following options are in effect: ARCH(11) or higher levels, FLOAT(AFP(NOVOLATILE)), HOT, and TARGET(zOSV2R2) or higher levels.
  • VECTOR(NOTYPE, NOAUTOSIMD) when all of the following options are in effect: ARCH(12), FLOAT(AFP(NOVOLATILE)), OPT(3), and TARGET(zOSV2R3).
  • Specifying VECTOR without suboptions is equivalent to VECTOR(TYPE).


Enables the support for vector data types, in addition to __vector data types. The default is NOTYPE.
Enables the automatic SIMDization or automatic vectorization optimization that uses Single Instruction Multiple Data (SIMD) instructions where possible, which calculate several results at one time and is faster than calculating each result sequentially. This optimization is available only when HOT is in effect. The default is NOAUTOSIMD.


The VECTOR option is effective only when ARCH(11) or higher levels, FLOAT(AFP(NOVOLATILE)), and TARGET(zOSV2R1) or higher levels are in effect.

IBM z13® (z13) and IBM z13s (z13s®) hardware introduced the support for vector instructions under the Vector Facility for z/Architecture®. The newest generation of the hardware with the vector enhancements facility 1 and vector packed decimal facility further enhances the support for vector instructions.

The VECTOR option enables the __vector data types for vector programming support. For more information about the language extensions for vector processing support, including compiler options, vector data types and operators, macro, and built-in functions, see Using vector programming support in z/OS XL C/C++ Programming Guide.

The VECTOR option provides potential performance improvements in the following aspects: fixed point decimal operations, built-in library functions, operations on binary floating-point double, float, and long double data types, and SIMD instructions. For more information, see VECTOR in z/OS XL C/C++ Programming Guide.

The vector or SIMD code must run in the following runtime environments that support vector instructions and vector context switching:
  • z/OS® V2.1 with PTF for APAR PI12281 or later.
  • z/OS image running on z/VM® V6.3 with PTF for APAR VM65733 or later.
  • CICS® Transaction Server V5.3 with PTF for APAR PI59322 or later.

The usage status of this option is inserted in the object file to aid you in diagnosing a problem with your program.

IPA effects

If you specify the AUTOSIMD suboption on the IPA link step, it uses this suboption for all partitions. The IPA link step Prolog and all Partition Map sections of the IPA link step listing display this suboption.

If you do not specify the AUTOSIMD suboption on the IPA link step, the value used for a partition depends on the value that you specified for the IPA compile step for each compilation unit that provided code for that partition.

If you specify the NOVECTOR option, or the TYPE, NOTYPE, or NOAUTOSIMD suboption on the IPA link step, the compiler ignores them.

Predefined macros

__VEC__ is defined to 10402 when VECTOR is in effect.

Related information