HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

3.2.6  iterator Modifier

Modifiers

Name

Modifies

Type

Properties

iterator

locator-list

Complex, name: iterator Arguments:

iterator-specifier

OpenMP expression (repeatable)

unique

Clauses

affinity

,

depend

,

from

,

map

,

to

An iterator modifier is a unique, complex modifier that defines a set of iterators, each of which is an iterator-identifier and an associated set of values. An iterator-identifier expands to those values in the clause argument for which it is specified. Each member of the modifier-parameter-specification list of an iterator modifier is an iterator-specifier with this format:

 
[ iterator-type ]  iterator-identifier = range-specification  
 
[ iterator-type :: ] iterator-identifier = range-specification  

where:

In an iterator-specifier, if the iterator-type is not specified then that iterator is of int type.
In an iterator-specifier, if the iterator-type is not specified then that iterator has default integer type.

In a range-specification, if the step is not specified its value is implicitly defined to be 1.

An iterator only exists in the context of the clause argument that it modifies. An iterator also hides all accessible symbols with the same name in the context of that clause argument.

The use of a variable in an expression that appears in the range-specification causes an implicit reference to the variable in all enclosing constructs.

The values of the iterator are the set of values i0, …, iN1 where:
The values of the iterator are the set of values i1, …, iN where:

The set of values will be empty if no possible value complies with the conditions above.

If an iterator-identifier appears in a list-item expression of the modified argument, the effect is as if the list item is instantiated within the clause for each member of the iterator value set, substituting each occurrence of iterator-identifier in the list-item expression with the iterator value. If the iterator value set is empty then the effect is as if the list item was not specified.

Restrictions

Restrictions to iterator modifiers are as follows:

Cross References