HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
OMP TASK Pragma
#pragma omp task [clause1, clause2, . . .] new-line
[ 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:
• if (scalar-expression))
• untied
• default (shared | none)
• private (list)
• firstprivate (list)
• shared (list)
The TASK directive defines an explicit task.
OMP TASKWAIT Pragma
#pragma omp taskwait new-line
The TASKWAIT directive specifies a wait on the completion of child tasks generated since
the beginning of the current task.
Because the TASKWAIT construct does not have a C language statement as part of its
syntax, there are some restrictions on its placement within a program. The TASKWAIT
directive may be placed only at a point where a base language statement is allowed.
The TASKWAIT directive may not be used in place of the statement following an if,
while, do, switch, or label.
OMP THREADPRIVATE Pragma
#pragma omp threadprivate (list)
where (list) is a comma-separated list of variables that do not have an incomplete
type.
The threadprivate directive makes the named file-scope, namescope-scope,
or static block-scope variables private to a thread.
OpenMP Clauses
Clauses on directives may be repeated as needed, subject to the restrictions listed in the
description of each clause. The order in which clauses appear in directives is not
significant. If variable-list appears in a clause, it must specify only variables. The following
is the list of clauses in OpenMP directives:
OpenMP Clauses 139