OpenMP Directives 

Provides links to directives used in the OpenMP API.

Visual C++ supports the following OpenMP directives:

Directive Description


Specifies that a memory location that will be updated atomically.


Synchronizes all threads in a team; all threads pause at the barrier, until all threads execute the barrier.


Specifies that code is only executed on one thread at a time.

flush (OpenMP)

Specifies that all threads have the same view of memory for all shared objects.

for (OpenMP)

Causes the work done in a for loop inside a parallel region to be divided among threads.


Specifies that only the master threadshould execute a section of the program.

ordered (OpenMP Directives)

Specifies that code under a parallelized for loop should be executed like a sequential loop.


Defines a parallel region, which is code that will be executed by multiple threads in parallel.

sections (OpenMP)

Identifies code sections to be divided among all threads.


Lets you specify that a section of code should be executed on a single thread, not necessarily the master thread.


Specifies that a variable is private to a thread.

Community Additions