FIRSTPRIVATE(list). STMicroelectronics PGI
Pubblicità
Pubblicità
Chapter 17. OpenMP Reference Information
FIRSTPRIVATE(list)
The FIRSTPRIVATE(list) clause specifies that each thread should have its own instance of a variable, and that each variable in the list should be initialized with the value of the original variable, because it exists before the parallel construct.
Variables that appear in the list of a FIRSTPRIVATE clause are subject to the same semantics as PRIVATE variables; however, these variables are initialized from the original object that exists prior to entering the parallel region.
If a directive construct contains a FIRSTPRIVATE argument to a Message Passing Interface (MPI) routine performing non-blocking communication, the MPI communication must complete before the end of the construct.
IF()
extent of the parallel region. Individual clauses specifying PRIVATE, SHARED, and so on, override the declared
DEFAULT.
Specifying DEFAULT(NONE) declares that there is no implicit default. With this declaration, each variable in the parallel region must be explicitly listed with an attribute of PRIVATE, SHARED, FIRSTPRIVATE, LASTPRIVATE, or
REDUCTION.
The IF() clause specifies whether a loop should be executed in parallel or in serial.
In the presence of an IF clause, the parallel region is executed in parallel only if the corresponding scalar_logical_expression
evaluates to .TRUE.. Otherwise, the code within the region is executed by a single processor, regardless of the value of the environment variable
OMP_NUM_THREADS
.
LASTPRIVATE(list)
The LASTPRIVATE(list) clause specifies that the enclosing context's version of the variable is set equal to the
private
version of whichever thread executes the final iteration (for-loop construct) or last section (#pragma sections).
NOWAIT
The NOWAIT clause overrides the barrier implicit in a directive. When you specify NOWAIT, it removes the implicit barrier synchronization at the end of a for or sections construct.
NUM_THREADS
The NUM_THREADS clause sets the number of threads in a thread team. The num_threads clause allows a user to request a specific number of threads for a parallel construct. If the num_threads clause is present, then
ORDERED
The ORDERED clause specifies that a loop is executed in the order of the loop iterations. This clause is required on a parallel FOR statement when an ordered directive is used in the loop.
311
Scarica
Pubblicità