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

ID 767253
Date 11/07/2023
Public

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

Visible to Intel only — GUID: GUID-34CFF5B7-4F26-4FCA-B73B-494A28C9E226

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