Start of change

VECTOR | NOVECTOR

Category

Language element control

Pragma equivalent

None.

Purpose

Enables compiler support for vector data types and operations.

Syntax

Read syntax diagramSkip visual syntax diagram
     .-NOVECTOR-.                                   
>>---+-VECTOR---+----+--------------------------+--------------><
                     |    .-,--------------.    |   
                     |    | .-NOAUTOSIMD-. |    |   
                     |    V +-NOTYPE-----+ |    |   
                     '-(----+-TYPE-------+-+--)-'   
                            '-AUTOSIMD---'          

Defaults

NOVECTOR(NOTYPE, NOAUTOSIMD)

When ARCH(11) or higher levels, FLOAT(AFP(NOVOLATILE)), TARGET(zOSV2R2) or higher levels, and HOT are specified, the default is VECTOR(NOTYPE, AUTOSIMD).
Notes:
  • Specifying VECTOR without suboptions is equivalent to VECTOR(TYPE).
  • If LANGLVL(STRICT98) or LANGLVL(ANSI) is in effect, the default is NOVECTOR.

Parameters

TYPE
In addition to __vector data types, enables the compiler to support vector data types when TYPE is specified.
AUTOSIMD
Enables the compiler to generate code, when possible, using the SIMD instructions enabled under the Vector facility for z/Architecture®. AUTOSIMD is an optimization that is available when HOT is in effect.

Usage

The VECTOR option introduces support for the Vector facility for z/Architecture, a feature implemented in IBM® z Systems™ z13™ hardware. It requires z/OS® V2R1 (or newer versions) with z13 (or newer hardware) support.

The VECTOR option is effective only when ARCH(11), FLOAT(AFP(NOVOLATILE)), and TARGET(zOSV2R1) or higher level are specified. Otherwise, the compiler issues a warning message and ignores it.

The VECTOR option supports __vector data types.

The VECTOR option implies LANGLVL(LONGLONG).

The SIMD or Vector code must run in a runtime environment that supports vector instructions and vector context switching. SIMD or Vector code that is compiled by z/OS V2R2 XL C/C++ might run into a runtime abend in the following environment:
  • z/OS image running on z/VM®
  • z/OS version older than V2R1 with PTF PI12281
  • CICS®

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.

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 10205 when VECTOR is in effect.

Related information

End of change