OpenMP¶
Category: Parallelism · Status: stub
One line: Compiler directives and a runtime that parallelize loops and sections of C, C++ and Fortran programs over shared memory.
Also called: OMP.
How it connects¶
flowchart LR
n_openmp["OpenMP"]
n_thread_pool["Thread pool and executor"]
n_openmp -->|uses| n_thread_pool
classDef center stroke-width:3px
class n_openmp center
classDef outside stroke-dasharray: 4 3
class n_thread_pool outside
- Is built on: Thread pool and executor
In each language¶
| C | Compiler directives defined by the OpenMP specifications ↗; the GNU implementation is libgomp ↗ |
| C++ | The same directives as C; C++17 execution policies ↗ parallelize standard algorithms without them |
Where to read more¶
- In the books: Parallel Programming with Intel Parallel Studio XE, Stephen Blair-Chappell, Andrew Stokes — ch. 3, 'Parallel Studio XE for the Impatient' → 'Example 2: Working with OpenMP'
- In the books: Advanced Python Programming, Quan Nguyen — ch. 8, 'Parallel Processing' → 'Parallel Cython with OpenMP'
- In the books: An Introduction to Parallel Programming, Peter S. Pacheco, Matthew Malensek — ch. 5, 'Shared-memory programming with OpenMP'
- Reference: OpenMP ↗