Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

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

Document Table of Contents

Predefined Preprocessor Symbols

IA-32 is not available on macOS. IA-32 is deprecated on other operating systems and will be removed in a future release.

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 Description

__APPLE__

(macOS)

Defined as '1'.

__AVX512BW__

(Windows, Linux, macOS)

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

__AVX512BW__ is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified.

__AVX512CD__

(Windows, Linux, macOS)

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

__AVX512CD__ is also defined as '1' when option [Q]xCORE-AVX512, [Q]xCOMMON-AVX512, or higher processor-targeting options are specified.

__AVX512DQ__

(Windows, Linux, macOS)

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

__AVX512DQ__ is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified.

__AVX512ER__

(Windows, Linux, macOS)

Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Exponential and Reciprocal Instructions.

Footnotes:

1 The 2021.1 Intel® Fortran Compiler (ifx) produces the __INTEL_COMPILER format for this macro. Subsequent releases use the format as documented.

See Also