The compiler supports the predefined macros listed in the table below. The compiler also includes predefined macros specified by the ISO/ANSI standard.
Unless otherwise stated, the macros are supported on systems based on IA-32 (for C++ only) and Intel® 64 architectures.
Macro | Description |
---|---|
__AVX__ |
On Linux*, defined as '1' when option -march=corei7-avx, or higher processor targeting options are specified. NoteAvailable only for compilations targeting Intel® 64 architecture. |
__AVX2__ ( Linux) |
On Linux, defined as '1' when option -march=core-avx2, or higher processor targeting options are specified. NoteAvailable only for compilations targeting Intel® 64 architecture. |
__AVX512BW__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Byte and Word Instructions (BWI). |
__AVX512CD__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Conflict Detection Instructions (CDI). |
__AVX512DQ__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Doubleword and Quadword Instructions (DQI). |
__AVX512ER__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Exponential and Reciprocal instructions. |
__AVX512F__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Foundation instructions. |
__AVX512PF__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Prefetch instructions. |
__AVX512VL__ (Windows*, Linux) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Vector Length extensions. |
__BASE_FILE__ (Linux) |
Name of source file |
__COUNTER__ (Windows) |
Defined as '0'. |
__cplusplus (Linux) |
Defined as '1' (for the Intel® oneAPI DPC++/C++ Compiler). |
__ELF__ (Linux) |
Defined as '1' at the start of compilation. |
__EXCEPTIONS (Linux) |
Defined as '1' when option fno-exceptions is not used. |
__gnu_linux__ (Linux) |
Defined as '1' at the start of compilation. |
__GNUC__ (Linux) |
The major version number of GCC installed on the system or explicitly specified via –gcc-name/ –gxx-name (C++ only). |
__GNUC_MINOR__ (Linux) |
The minor version number of GCC or g++* installed on the system or explicitly specified via –gcc-name/ –gxx-name (C++ only). |
__GNUC_PATCHLEVEL__ (Linux) |
The patch level version number of GCC or G++ installed on the system or explicitly specified via –gcc-name/ –gxx-name (C++ only). |
__GNUG__ (Linux) |
The major version number of G++ installed on the system or explicitly specified via –gcc-name/ –gxx-name (C++ only). |
__i386__ __i386 i386 (Linux) |
Defined as '1' for compilations targeting IA-32 architecture (C++ only). |
_INTEGRAL_MAX_BITS (Windows) |
64 |
__INTEL_COMPILER (Windows*, Linux) |
The version of the compiler. |
__INTEL_COMPILER_BUILD_DATE (Windows*, Linux) |
The compiler build date. It takes the form YYYYMMDD, where YYYY is the year, MM is the month, and DD is the day. |
__INTEL_MS_COMPAT_LEVEL (Windows) |
Defined as '1'. |
__linux__ __linux linux (Linux) |
Defined as '1' at the start of compilation. |
__LONG_DOUBLE_SIZE__ (Windows*, Linux) |
On Linux, defined as 80. On Windows, defined as 64; defined as 80 when option /Qlong-double is specified. |
__LONG_MAX__ (Linux) |
9223372036854775807L NoteAvailable only for compilations targeting Intel® 64 architecture. |
__LP64__ (Linux) __LP64 (Linux) |
Defined as '1'. NoteAvailable only for compilations targeting Intel® 64 architecture. |
_M_IX86 (Windows) |
700 |
_M_X64 (Windows) |
Defined as '1' while building code targeting Intel® 64 architecture. |
__MMX__ (Linux) |
Defined as '1'. On Linux, it is available only on systems based on Intel® 64 architecture. |
_MSC_EXTENSIONS (Windows) |
This macro is defined when Microsoft extensions are enabled. |
_MSC_FULL_VER (Windows) |
The Visual C++* version being used. |
_MSC_VER (Windows) |
The Visual C++ version being used. |
_MT (Windows) |
On Windows, defined as '1' when a multithreaded DLL or library is used (when option /MD[d] or /MT[d] is specified). |
__NO_MATH_INLINES __NO_STRING_INLINES (Linux) |
Defined as '1'. |
_OPENMP (Windows, Linux) |
201611 when you specify option [Q]openmp. |
__OPTIMIZE__ (Linux) |
Defined as '1'. |
__pentium4 __pentium4__ (Linux) |
Defined as '1'. |
__PIC__ __pic__ (Linux) |
On Linux, defined as '1' when option fPIC is specified. |
__PTRDIFF_TYPE__ (Linux) |
On Linux, defined as int on IA-32 architecture (C++ only); defined as long on Intel® 64 architecture. |
__QMSPP_ (Windows) |
Defined as '1'. |
__REGISTER_PREFIX__ (Linux) |
|
__SIGNED_CHARS__ (Windows, Linux) |
Defined as '1'. |
_SIZE_T_DEFINED (Windows) |
Defined, no value. |
__SIZE_TYPE__ (Linux) |
On Linux, defined as unsigned on IA-32 architecture (C++ only); defined as unsigned long on Intel® 64 architecture. |
__SSE__ (Windows, Linux) |
On Linux, defined as '1' for processors that support SSE instructions. On Windows, defined as '1'. |
__SSE2__ (Windows, Linux) |
On Linux, defined as '1' for processors that support Intel® SSE2 instructions. |
__SSE3__ (Windows, Linux) |
On Linux, defined as '1' for processors that support Intel® SSE3 instructions. |
__SSE4_1__ (Windows, Linux) |
On Linux, defined as '1' for processors that support Intel® SSE4 instructions. |
__SSE4_2__ (Windows, Linux) |
On Linux, defined as '1' for processors that support SSSE4 instructions. |
__SSSE3__ (Windows, Linux) |
On Linux, defined as '1' for processors that support SSSE3 instructions. |
__SYCL_COMPILER_VERSION (Windows*, Linux*) |
The build date of the SYCL* library, presented in the format YYYYMMDD.
NoteThis is only available after the SYCL library headers are included in the source code. |
unix __unix __unix__ (Linux) |
Defined as '1'. |
__USER_LABEL_PREFIX__ (Linux) |
|
_VA_LIST_DEFINED (Windows) |
Defined, no value. |
__VERSION__ (Linux) |
The compiler version string |
__w64 (Windows) |
Defined, no value. |
__WCHAR_T (Linux) |
Defined as '1'. |
_WCHAR_T_DEFINED (Windows) |
Defined when option /Zc:wchar_t is specified or "wctype_t" is defined in the header file. |
__WCHAR_TYPE__ (Linux) |
On Linux, defined as long int on IA-32 architecture (C++ only); defined as int on Intel® 64 architecture. |
_WCTYPE_T_DEFINED (Windows) |
Defined when "wctype_t" is defined in the header file. |
_WIN32 (Windows) |
Defined as '1' while building code targeting IA-32 (C++ only) or Intel® 64 architecture. |
_WIN64 (Windows) |
Defined as '1' while building code targeting Intel® 64 architecture. |
__WINT_TYPE__ (Linux) |
Defined as unsigned int. |
__x86_64 __x86_64__ (Linux) |
Defined as '1' while building code targeting Intel® 64 architecture. |