Enables recognition of OpenMP* features, such as parallel, simd, and offloading directives, and tells the parallelizer to generate multi-threaded code based on OpenMP* directives. This is an alternate name for compiler option -qopenmp (and /Qopenmp).
Linux: | -fiopenmp |
Windows: | /Qiopenmp |
None
OFF |
No OpenMP* multi-threaded code is generated by the compiler. |
This option enables recognition of OpenMP* features, such as parallel, simd, and offloading directives. This is an alternate option for compiler option [Q or q]openmp.
The -fiopenmp and /Qiopenmp options enable Intel's implementation of OpenMP* in the compiler back end. The compiler front end produces an intermediate representation that preserves the parallelism exposed by OpenMP* directives. The back end uses the exposed parallelism to do more advanced optimizations, such as SIMD vectorization.
Option -fiopenmp is not the same as option -fopenmp.
To enable offloading to a specified GPU target, you must also specify option -fopenmp-targets (Linux*) or /Qopenmp-targets (Windows).
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |
Visual Studio: DPC++ > Language > OpenMP Support
C/C++ > Language [Intel C++] > OpenMP Support
Intel® oneAPI DPC++ Compiler > Language > OpenMP Support
Intel C++ Compiler > Language > OpenMP Support
Eclipse: Intel® oneAPI DPC++ Compiler > Language > OpenMP Support
Intel C++ Compiler > Language > OpenMP Support
Linux: -qopenmp
Windows: /Qopenmp
The following enables OpenMP parallelization (but no offloading) of OpenMP constructs such as "parallel", "loop" and "simd":
icx -fiopenmp foo.c
Because option -fiopenmp is not specified, the following enables SIMD vectorization, but no OpenMP parallelization or offloading:
icpx -qopenmp-simd foo.c
The following enables OpenMP parallelization and SIMD vectorization + offloading to a spir64 target:
icpx -fiopenmp -fopenmp-targets=spir64 bar1.cpp