OpenMP (Open Multi-Processing) is an API that supports multi-platform shared-memory multiprocessing programming in C, C++, and Fortran, on many platforms, instruction-set architectures and operating systems, including Solaris, AIX, FreeBSD, HP-UX, Linux, macOS, and Windows.1
The directives, library routines, environment variables, and tool support allow users to create, to manage, to debug and to analyze parallel programs while permitting portability.
- The directives extend the C, C++ and Fortran base languages with SPMD constructs, tasking constructs, device constructs, work-distribution constructs, and synchronization constructs, and they provide support for sharing, mapping and privatizing data.
- The functionality to control the runtime environment is provided by library routines and environment variables.
- Compilers that support the OpenMP API often include command line options to enable or to disable interpretation of some or all OpenMP directives.
| Compiler | OpenMP |
|---|---|
| MSVC | OpenMP 2.0 |
| GCC 4.3.1 | OpenMP 3.0 |
| ICC 11.0 | |
| GCC 4.7 | OpenMP 3.1 |
| Clang 3.7 | |
| ICC 12.1 | |
| GCC 4.9.0 | OpenMP 4.0 |
| ICC 15.0 | |
| GCC 6 | OpenMP 4.5 |
| ICC 17.0 | |
| GCC 9 | OpenMP 5.0 |
| Clang 12 | |
| ICC 19.1 |
OpenMP in Visual C++ | Microsoft Docs
- OpenMP 2.0
Examples | Microsoft Docs /openmp (Enable OpenMP Support) | Microsoft Docs
- 能用来反逆向吗?
Different math results in openMP depended on number of processes - Intel Community