This is a summary of the OpenMP* directives and clauses supported in the Intel® Compiler. For detailed information about the OpenMP API, see the OpenMP Application Program Interface Version 2.5 specification, which is available from the OpenMP web site (http://www.openmp.org/).
Directive |
Description |
---|---|
PARALLEL |
Defines a parallel region. |
TASK |
Defines a task region. |
DO |
Identifies an iterative worksharing construct in which the iterations of the associated loop should be divided among threads in a team. |
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 DO |
A shortcut for a PARALLEL region that contains a single DO directive.
|
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. |
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 |
Ensures that a specific memory location is updated atomically, rather than exposing it to the possibility of multiple, simultaneously writing threads. |
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 enclosed structured block is executed in the order in which iterations would be executed in a sequential loop. |
THREADPRIVATE (list) |
Makes the named COMMON blocks or variables private to a thread. The list argument consists of a comma-separated list of COMMON blocks or variables. |
Clause |
Description |
---|---|
PRIVATE (list) |
Declares variables in list to be PRIVATE to each thread in a team. |
FIRSTPRIVATE (list) |
Same as PRIVATE, but the copy of each variable in the list is initialized using the value of the original variable existing before the construct. |
LASTPRIVATE (list) |
Same as PRIVATE, but the original variables in list are updated using the values assigned to the corresponding PRIVATE variables in the last iteration in the DO construct loop or the last SECTION construct. |
COPYPRIVATE (list) |
Uses private variables in list to broadcast values, or pointers to shared objects, from one member of a team to the other members at the end of a single construct. |
NOWAIT |
Specifies that threads need not wait at the end of worksharing constructs until they have completed execution. The threads may proceed past the end of the worksharing constructs as soon as there is no more work available for them to execute. |
SHARED (list) |
Shares variables in list among all the threads in a team. |
DEFAULT (mode) |
Determines the default data-scope attributes of variables not explicitly specified by another clause. Possible values for mode are PRIVATE, SHARED, or NONE. |
REDUCTION ({operator|intrinsic}:list) |
Performs a reduction on variables that appear in list with the operator operator or the intrinsic procedure name intrinsic; operator is one of the following: +, *, .AND., .OR., .EQV., .NEQV.; intrinsic refers to one of the following: MAX, MIN, IAND, IOR, or IEOR. |
ORDERED |
Used in conjunction with a DO or SECTIONS construct to impose a serial order on the execution of a section of code. If ORDERED constructs are contained in the dynamic extent of the DO construct, the ordered clause must be present on the DO directive. |
IF (expression) |
The enclosed parallel region is executed in parallel only if the expression evaluates to .TRUE., otherwise the parallel region is serialized. The expression must be scalar logical. |
NUM_THREADS (expression) |
Requests the number of threads specified by expression for the parallel region. The expressions must be scalar integers. |
SCHEDULE (type[,chunk]) |
Specifies how iterations of the DO construct are divided among the threads of the team. Possible values for the type argument are STATIC, DYNAMIC, GUIDED, and RUNTIME. The optional chunk argument must be a positive scalar integer expression. |
COLLAPSE (n) |
Specifies how many loops are associated with the OpenMP loop construct for collapsing. |
COPYIN (list) |
Provide a mechanism to specify that the master thread data values be copied to the THREADPRIVATE copy of the common blocks or variables specified in list at the beginning of the parallel region. |
UNTIED |
Indicates that a resumed task does not have to be executed by same thread executing it before it was suspended. |
See Data Scope Attribute Clauses Overview.
Directive |
Use these Clauses |
---|---|
PARALLEL |
|
DO |
|
SECTIONS |
|
SECTION |
None |
SINGLE |
|
PARALLEL DO |
|
PARALLEL SECTIONS |
|
All others |
None |