| Name: simd | Association: loop |
| Category: executable | Properties: parallelism-generating, context-matching, simdizable, pure |
|
|
Separating directives
scanClauses
aligned, collapse, if, lastprivate, linear, nontemporal, order, private, reduction, safelen, simdlenBinding
A simd region binds to the current task region. The binding thread set of the simd region is the current team.Semantics
The simd construct enables the execution of multiple iterations of the associated loops concurrently by using SIMD instructions. At the beginning of each logical iteration, the loop iteration variable or the variable declared by range-decl of each associated loop has the value that it would have if the set of the associated loops was executed sequentially. The number of iterations that are executed concurrently at any given time is implementation defined. Each concurrent iteration will be executed by a different SIMD lane. Each set of concurrent iterations is a SIMD chunk. Lexical forward dependences in the iterations of the original loop must be preserved within each SIMD chunk, unless an order clause that specifies concurrent is present.When an if clause is present and evaluates to false, the preferred number of iterations to be executed concurrently is one, regardless of whether a simdlen clause is specified.
Restrictions
Restrictions to the simd construct are as follows:If an order clause that specifies concurrent appears on a simd directive, the safelen clause may not also appear.
Cross References