HP aC++/HP C A.06.20 Programmer's Guide
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 ]
. . .}
where [clause1, clause2, ...] indicates that the clauses are optional. There
can be zero or more clauses.
The parallel sections pragma is a shortcut for specifying a parallel clause
containing a single sections pragma. parallel sections admits all the allowable
clauses of the parallel pragma and the sections pragma except for the nowait
clause.
OMP SECTIONS Pragma
#pragma omp sections [clause1, clause2, ...]
{
#pragma omp section
[ structured-block ]
[#pragma omp section
structured-block ]
. . .
}
where [clause1, clause2, ...] indicates that the clauses are optional. There
can be zero or more clauses. clause may be one of the following:
• private(list)
• firstprivate(list)
• lastprivate(list)
• reduction(op:list)
• nowait
146 Pragma Directives and Attributes