This is a summary of the OpenMP* pragmas and clauses supported in the Intel® Compiler. For detailed information about the OpenMP API, see the OpenMP Application Program Interface Version 3.1 specification, which is available from the OpenMP web site (http://www.openmp.org/).
Pragma |
Description |
---|---|
parallel |
Defines a parallel region. |
task |
Indicates that the associated structured block should be executed in parallel as part of the enclosing parallel construct. |
sections |
Identifies a non-iterative worksharing construct that specifies a set of structured blocks that are to be divided among threads in a team. |
section |
Indicates that the associated structured block should be executed in parallel as part of the enclosing sections construct. |
single |
Identifies a construct that specifies that the associated structured block is executed by only one thread in the team. |
parallel for |
A shortcut for a parallel region that contains a single for directive.
|
for |
Identifies an iterative work-sharing construct that specifies a region in which the iterations of the associated loop should be executed in parallel. Each iteration is executed by one of the threads in the team. |
parallel sections |
Provides a shortcut form for specifying a parallel region containing a single sections construct. |
master |
Identifies a construct that specifies a structured block that is executed by only the master thread of the team. |
critical[name] |
Identifies a construct that restricts execution of the associated structured block to a single thread at a time. Each thread waits at the beginning of the critical construct until no other thread is executing a critical construct with the same name argument. |
taskwait |
Indicates a wait on the completion of child tasks generated since the beginning of the current task. |
taskyield |
Indicates that the current task can be suspended in favor of a different task. |
barrier |
Synchronizes all the threads in a team. Each thread waits until all of the other threads in that team have reached this point. |
atomic update |
Synchronizes with other atomic operations on a given variable. Updates the variable atomically with the indicated operation. |
atomic read |
Synchronizes with other atomic operations on a given variable. Reads the variable atomically. |
atomic write |
Synchronizes with other atomic operations on a given variable. Writes a new value into the variable. |
atomic capture |
Synchronizes with other atomic operations on a given variable. Captures the old value of a variable atomically, then applies the indicated operation to the variable. |
flush [(list)] |
Specifies a cross-thread sequence point at which the implementation is required to ensure that all the threads in a team have a consistent view of certain objects in memory. The optional list argument consists of a comma-separated list of variables to be flushed. |
ordered |
The structured block following this directive is executed in the order in which iterations would be executed in a sequential loop. |
threadprivate (list) |
Makes the named file-scoped, namespace-scoped, or static block-scoped variables specified private to a thread. |
Clause |
Description |
---|---|
private |
Declares variables to be private to each thread in a team. Private copies of the variable are initialized from the original object when entering the region. |
firstprivate |
Provides a superset of the functionality provided by the private clause. Each private data object is initialized with the value of the original object. |
lastprivate |
Provides a superset of the functionality provided by the private clause. The original object is updated with the value of the private copy from the last sequential iteration of the associated loop, or the lexically last section construct, when exiting the region. |
shared |
Shares variables among all the threads in a team. |
default |
Enables you to affect the data-scope attributes of variables. |
reduction |
Performs a reduction on scalar variables. |
ordered |
The structured block following an ordered directive is executed in the order in which iterations would be executed in a sequential loop. |
if (expression) |
If the if(expression)clause is present, the enclosed code block is executed in parallel only if the expression evaluates to TRUE. Otherwise the code block is serialized. The expression must be scalar logical. |
schedule |
Specifies how iterations of the for loop are divided among the threads of the team. |
collapse(n) |
Specifies how many loops are associated with the OpenMP loop construct for collapsing. |
copyin |
Provides a mechanism to copy the data values of the master thread to the variables used by the threadprivate copies at the beginning of the parallel region. |
copyprivate |
Provides a mechanism to use a private variable to broadcast a value from the data environment of one implicit task to the data environments of the other implicit tasks belonging to the parallel region. |
nowait |
Indicates that an implementation may omit the barrier at the end of the worksharing region. |
untied |
Indicates that a resumed task does not have to be executed by same thread executing it before it was suspended. |
mergeable |
Indicates that the task defined by this task pragma need not create a private data environment for the task, but if the task execution is deferred, then the private data environment is created. |
final(expr) |
The expr is evaluated, and if the value is true, then this task and all its descendant tasks are non-deferred (not executed in parallel). |
Copyright © 1996-2011, Intel Corporation. All rights reserved.