HP aC++/HP C A.06.20 Programmer's Guide

#pragma UNROLL (n)
This block-scoped pragma applies the unroll factor for a loop containing the current
block. You can apply an unroll factor that you think is best for the given loop or apply
no unroll factor to the loop. If this pragma is not specified, the compiler uses its own
heuristics to determine the best unroll factor for the inner loop.
A user specified unroll factor will override the default unroll factor applied by the
compiler.
Specifying n=1 will prevent the compiler from unrolling the loop.
Specifying n=0 allows the compiler to use its own heuristics to apply the unroll factor.
Note that this option has no effect on loop unroll-and-jam.
NOTE: UNROLL_FACTOR pragma will be ignored if it is placed in a loop other than
the innermost loop. The UNROLL pragma must be immediately followed with a loop
statement and will be ignored if it is not an innermost loop.
OMP ATOMIC Pragma
#pragma omp atomic
expression-stmt
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.
Other Pragmas 143