Next:
Examples of the Up: The FORALL Statement Previous: General Form of


Interpretation of Element Array Assignments

Execution of an element array assignment consists of the following steps:

  1. Evaluation in any order of the subscript and stride expressions in the forall-triplet-spec-list. The set of valid combinations of index-name values is then the Cartesian product of the sets defined by these triplets.
  2. Evaluation of the scalar-mask-expr for all valid combinations of index-name values. The mask elements may be evaluated in any order. The set of active combinations of index-name values is the subset of the valid combinations for which the mask evaluates to .TRUE.
  3. Evaluation in any order of the expr and all expressions within variable (in the case of assignment-stmt) or target and all expressions within pointer-object (in the case of pointer-assignment-stmt.) of the forall-assignment for all active combinations of index-name values. In the case of pointer assignment where the target is not a pointer, the evaluation consists of identifying the object referenced rather than computing its value.
  4. Assignment of the computed expr values to the corresponding variable locations (in the case of assignment-stmt) or the association of the target values with the corresponding pointer-object locations (in the case of pointer-assignment-stmt) for all active combinations of index-name values. The assignments or associations may be made in any order. In the case of a pointer assignment where the target is not a pointer, this assignment consists of associating the pointer-object with the object referenced.

If the scalar mask expression is omitted, it is as if it were present with the value .TRUE.

The scope of an index-name is the FORALL statement itself.

A forall-stmt is not HPF-conforming if the result of evaluating any expression in the forall-header affects or is affected by the evaluation of any other expression in the forall-header.

A forall-stmt is not HPF-conforming if it causes any atomic data object to be assigned more than one value. A data object is atomic if it contains no subobjects. For the purposes of this restriction, any assignment (including array assignment or assignment to a variable of derived type) to a non-atomic object is considered to assign to all subobjects contained by that object.



Next:
Examples of the Up: The FORALL Statement Previous: General Form of

paula@erc.msstate.edu
Thu Jul 21 17:05:43 CDT 1994