HP aC++/HP C A.06.20 Programmer's Guide
NOTE: The directive is not implied if a nowait clause is present.
OMP MASTER Pragma
#pragma omp master
structured-block
The master pragma directs that the structured-block following it should be
executed by the master thread (thread 0) of the team. Other threads in the team do not
execute the associated block.
OMP ORDERED Pragma
#pragma omp ordered
structured-block
The ordered pragma indicates that the following structured block should be executed
in the same order in which iterations will be executed in a sequential loop.
An ordered directive must be within the dynamic extent of a for or a parallel
for construct that has an ordered clause. When the ordered clause is used with
schedule which has a chunksize, then the chunksize is ignored by the compiler.
OMP PARALLEL Pragma
#pragma omp parallel [clause1, clause2,...]
structured-block
where [clause1, clause2, ...] indicates that the clauses are optional. There
can be zero or more clauses.
clause can be one or more of the following:
• private(list)
• firstprivate(list)
• default(shared|none)
• shared(list)
• reduction(op:list)
• if (scalar-expression)
• copyin (list)
• num_threads
The parallel pragma defines a parallel region, which is a region of the program that
is executed by multiple threads in parallel. This is the fundamental construct that starts
parallel execution.
Other Pragmas 145