ALIGNED (list [: n])
Specifies that all variables in list are
aligned in a DO loop. Any variable that appears in list
cannot appear in more than one ALIGNED clause.
The n must be a constant positive integer expression; it
indicates the number of bytes for the alignment. If n is
not specified, the compiler uses the default alignment specified
for SIMD instructions on the target platform.
The ALIGNED clause overrides efficiency
heuristics in the optimizer. It instructs the compiler to use
aligned data movement instructions for all array references. This
clause disables all the advanced alignment optimizations of the
compiler, such as determining alignment properties from the program
context or using dynamic loop peeling to make references
aligned.
Be careful when using the ALIGNED clause.
Instructing the compiler to implement all array references with
aligned data movement instructions will cause a runtime exception
if some of the access patterns are actually unaligned.
COLLAPSE (n)
Specifies how many loops are associated with the loop construct. The n must be a constant positive integer expression. If COLLAPSE is not specified, the only loop that is associated with the loop construct is the one that immediately follows the construct.
If n is greater than one, the iterations of all associated loops are collapsed into one larger iteration, which is then executed with SIMD instructions. The sequential execution of the iterations in all associated loops determines the order of the iterations in the collapsed iteration. The associated loops must be perfectly nested, that is, there must be no intervening code or any OpenMP directive between any two loops.
The iteration count for each associated loop is computed before entry to the outermost loop. If execution of any associated loop changes any of the values used to compute any of the iteration counts, then the behavior is unspecified. The integer kind used to compute the iteration count for the collapsed loop is implementation defined.
Only one COLLAPSE clause can appear in a SIMD directive.
LASTPRIVATE (list)
LINEAR (var1 [, var2]... [: step])
var |
Is a scalar variable.
|
step |
Is a compile-time positive, integer constant expression.
|
For each iteration of a scalar loop, each var is incremented by step. Every iteration of the vector loop increments the variables by VL (vector length)*step. If more than one step is specified for a var, a compile-time error occurs. Multiple LINEAR clauses can be used to specify different values for step.
A variable in a LINEAR clause cannot appear in a REDUCTION, PRIVATE, or LASTPRIVATE clause, or another LINEAR clause.
PRIVATE (list)
REDUCTION (operator : list)
SAFELEN(n)
Limits the number of iterations in a SIMD chunk
(set of concurrent iterations).
The n must be a constant positive integer expression; it
indicates the number of iterations allowed in a SIMD chunk.
When this clause is used, no two iterations executed concurrently
with SIMD instructions can have a greater distance in the logical
iteration space than n.
The number of iterations that are executed
concurrently at any given time is defined by the implementation.
Each concurrent iteration is executed by a different SIMD vector
lane.
Only one SAFELEN clause can appear in a SIMD directive.