OpenMP Directives

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Provides links to directives used in the OpenMP API.

Visual C++ supports the following OpenMP directives:

DirectiveDescription
atomicSpecifies that a memory location that will be updated atomically.
barrierSynchronizes all threads in a team; all threads pause at the barrier, until all threads execute the barrier.
criticalSpecifies that code is only executed on one thread at a time.
flushSpecifies that all threads have the same view of memory for all shared objects.
forCauses the work done in a for loop inside a parallel region to be divided among threads.
masterSpecifies that only the master threadshould execute a section of the program.
orderedSpecifies that code under a parallelized for loop should be executed like a sequential loop.
parallelDefines a parallel region, which is code that will be executed by multiple threads in parallel.
sectionsIdentifies code sections to be divided among all threads.
singleLets you specify that a section of code should be executed on a single thread, not necessarily the master thread.
threadprivateSpecifies that a variable is private to a thread.

OpenMP
Clauses

Show: