OpenMP Directives

Applies to C Applies to C++ OpenMP directives exploit shared memory parallelism by defining various types of parallel regions. Parallel regions can include both iterative and non-iterative segments of program code.

Pragmas fall into four general categories:

  1. The first category of pragmas lets you define parallel regions in which work is done by threads in parallel. Most of the OpenMP directives either statically or dynamically bind to an enclosing parallel region.
  2. The second category lets you define how work will be distributed or shared across the threads in a parallel region.
  3. The third category lets you control synchronization among threads.
  4. The fourth category lets you define the scope of data visibility across threads.

Related Concepts

Shared and Private Variables in a Parallel Environment

Related Tasks

Control Parallel Processing with Pragmas

Related References

Pragmas to Control Parallel Processing
OpenMP Run-time Options for Parallel Processing
Built-in Functions Used for Parallel Processing

For complete information about the OpenMP Specification, see:

IBM Copyright 2003