Invoke the Compiler
The Intel® oneAPI C++ Compiler is invoked using
icpx
(Linux*) or
icx
(Windows*). The Intel® oneAPI DPC++ Compiler is invoked using
dpcpp
.For more information, see Invoking the
Compiler
in the
Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference
.To enable OpenMP* offloading for C++ applications, invoke the compiler
with:
- icpx -fiopenmp -fopenmp-targets=<arch>(Linux)
- icx /Qiopenmp /Qopenmp-targets:<arch>(Windows).
To enable OpenMP offloading for DPC++ applications, invoke the compiler
with:
- dpcpp -fiopenmp -fopenmp-targets=<arch>(Linux)
- dpcpp-cl /Qiopenmp /Qopenmp-targets:<arch>(Windows)
For more information about options, you can go to the option
descriptions found in the Compiler
Options
section of the
Intel® oneAPI DPC++/C++ Compiler Developer Guide and
Reference
.The compiler driver has different compatibilities on different OS hosts.
On Linux,
dpcpp
provides GCC*-style command line options. On
Windows, dpcpp-cl
provides Microsoft Visual C++* compatibility with
Microsoft Visual Studio*.- It recognizes GCC-style command line options (starting with “-“) and can be useful for projects that share a build system across multiple operating systems.
- It recognizes Windows command line options (starting with “/”) and can be useful for Microsoft Visual Studio-based projects.