HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
where expression-stmt must have one of the following forms:
• x binop = expr
• x++
• ++x
• x--
• --x
Here, x is an lvalue expression with scalar type and expr is an expression with scalar
type that does not reference the object designated by x.
The atomic directive ensures that a specific memory location is updated atomically,
rather than exposing it to the possibility of multiple, simultaneous writing threads.
OMP BARRIER Pragma
#pragma omp barrier
The barrier pragma synchronizes all the threads in a team. When encountered, each
thread waits until all the threads in the team have reached that point.
The smallest statement to contain a barrier must be a block or a compound statement.
barrier is valid only inside a parallel region and outside the scope of for, section,
sections, critical, ordered, and master.
OMP CRITICAL Pragma
#pragma omp critical [(name)]
structured-block
The critical pragma identifies a construct that restricts the execution of the associated
structured block to one thread at a time.
The name parameter is optional. All unnamed critical sections map to the same name.
OMP FOR Pragma
#pragma omp for [clause1,clause2, ...]
for-loop
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)
• ordered
Other Pragmas 135