Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Additional Predefined Macros

The compiler includes predefined macros specified by the ISO/ANSI standard and it also supports the predefined macros listed in the following table.

Macro OS Support Description

__AVX__

Linux

Windows

Linux: Defined as 1 when option -march=corei7-avx, -xAVX, or higher processor targeting options are specified.

Windows: Defined as 1 when option /QxAVX or higher processor targeting options are specified.

__AVX2__

Linux

Windows

Linux: Defined as 1 when option -march=core-avx2,-xCORE-AVX2, or higher processor targeting options are specified.

Windows: Defined as 1 when option /QxCORE-AVX2 or higher processor targeting options are specified.

NOTE:

When any of the above options are specified, they also define macro AVX.

__AVX512BW__

Linux

Windows

Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Byte and Word Instructions (BWI).

__AVX512CD__

Linux

Windows

Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Conflict Detection Instructions (CDI).

__AVX512DQ__

Linux

Windows

Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Doubleword and Quadword Instructions (DQI).

See Also