HP aC++/HP C A.06.25 Programmer's Guide
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:
private
private(list)
The private clause declares the variables in the list to be private to each thread in a
team. A new object with automatic storage duration is allocated within the associated
structured block for each thread in the stream.
150 Pragma Directives and Attributes