Visible to Intel only — GUID: GUID-34CFF5B7-4F26-4FCA-B73B-494A28C9E226
Visible to Intel only — GUID: GUID-34CFF5B7-4F26-4FCA-B73B-494A28C9E226
Predefined Preprocessor Symbols
Preprocessor symbols (macros) let you substitute values in a program before it is compiled. The substitution is performed in the preprocessing phase.
The preprocessor symbols shown in the table below are predefined by the compiler system and are available to compiler directives and to fpp. If you want to use other symbol names, you need to specify them on the command line.
You can use the D compiler option to define the symbol names to be used during preprocessing. This option performs the same function as the #define preprocessor directive.
Preprocessing with fpp replaces every occurrence of the defined symbol name with the specified value. Preprocessing compiler directives only allow IF and IF DEFINED.
If you want to disable symbol replacement (also known as macro expansion) during the preprocessor step, you can specify the macro=no preprocessor option for fpp.
Disabling preprocessor symbol replacement is useful for running fpp to perform conditional compilation (using #ifdef, etc.) without replacement.
You can use the U preprocessor option to suppress an automatic definition of a preprocessor symbol. This option suppresses any symbol definition currently in effect for the specified name. This option also performs the same function as an #undef preprocessor directive.
The symbols in the following table can be used in both fpp and Fortran compiler conditional compilations.
Symbol | OS Support | Description |
---|---|---|
__amd64 __amd64__ |
Linux |
Defined as 1. |
__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). |
__AVX512ER__ |
Linux Windows |
Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Exponential and Reciprocal Instructions. |
__AVX512F__ |
Linux Windows |
Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Foundation instructions. |
__AVX512PF__ |
Linux Windows |
Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) PreFetch Instructions (PFI). |
__AVX512VL__ |
Linux Windows |
Defined as 1 for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Vector Length Extensions (VLE). |
_DEBUG |
Windows |
Defined as 1 only if option dbglibs, MT[d], or MD[d] is specified. |
_DLL |
Windows |
Defined as 1 only if one of the following options is specified or implied:
|
__ELF__ |
Linux |
Defined as 1 at the start of compilation. |
__gnu_linux__ |
Linux |
Defined as 1 at the start of compilation. |
__INTEL_COMPILER |
Linux Windows |
The version of the compiler in the form VVVVMMUU, where VVVV is the major release version, MM is the minor release version, and UU is the update number. For example, Version 2023.1.2 is indicated by a value of 20230102. See also symbol __INTEL_LLVM_COMPILER. |
__INTEL_COMPILER_UPDATE |
Linux Windows |
The compiler update number within a version (example: 1 for Update 1). See also symbol __INTEL_COMPILER. |
__INTEL_LLVM_COMPILER |
Linux Windows |
The version of the compiler in the form VVVVMMUU 1, where VVVV is the major release version, MM is the minor release version, and UU is the update number. For example, the base release of 2023.1 is represented by the value 20230100. This symbol is also recognized by CMake. |
__INTEL_LLVM_COMPILER_UPDATE |
Linux Windows |
The compiler update number within a version (example: 1 for Update 1). See also symbol __INTEL_LLVM_COMPILER. |
__INTEL_PREVIEW_BREAKING_CHANGES |
Linux Windows |
Lets a user tell the compiler that they are willing to give up backward compatibility guarantees and lets the compiler enable new backward breaking changes that will appear in the next major release. This is set automatically when compiler option -fpreview-breaking-changes is specified. The breaking changes specified will be the default in the next major compiler release. So this option lets you prepare for that release should you want to do so. |
__linux__ __linux linux |
Linux |
Defined as 1 at the start of compilation. |
_M_X64 |
Windows |
Defined as 100. |
_MT |
Windows |
Defined as 1 when option /threads or /MT is specified. |
_OPENMP |
Linux Windows |
Defined when OpenMP processing has been requested (that is, option [q or Q]openmp has been specified and preprocessing occurs). The value takes the form YYYYMM, where YYYY is the year and MM is the month of the supported OpenMP Fortran specification. |
__PIC__ __pic__ |
Linux |
Defined as 1 only if the code requested compilation as position-independent code. |
unix __unix __unix__ |
Linux |
Defined as 1. |
_WIN64 |
Windows |
Defined as 1. |
__x86_64 __x86_64__ |
Linux |
Defined as 1. |
Footnotes:
1 The 2021.1 Intel® Fortran Compiler (ifx) produces the __INTEL_COMPILER format for this macro. Subsequent releases use the format as documented.