HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
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.
OMP PARALLEL FOR Pragma
#pragma omp parallel for [clause1, clause2, ... ]
for-loop
where [clause1, clause2, ...] indicates that the clauses are optional. There can be
zero or more clauses.
The parallel for pragma is a shortcut for a parallel region that contains a single
for pragma. parallel for admits all the allowable clauses of the parallel pragma
and the for pragma except for the nowait caluse.
OMP PARALLEL SECTIONS Pragma
#pragma omp parallel sections [clause1, clause2, ...]
{
[#pragma omp section ]
structured-block
[#pragma omp section
structured-block ]
. . .}
Other Pragmas 137