[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ]



Next:
Interpretation of the Up: The FORALL Construct Previous: The FORALL Construct

General Form of the FORALL Construct

Rule R215 of the Fortran 90 standard for executable-construct is extended to include the forall-construct.

XBNF forall-construct -to -rule to to is FORALL forall-header forall-body-stmt [ forall-body-stmt ] ... END FORALL

forall-body-stmt -to -rule to to is forall-assignment -to or where-stmt -to or where-construct -to or forall-stmt -to or forall-construct XBNF

To determine the set of permitted values for an index-name, we introduce some simplifying notation. In the forall-triplet-spec, let

If stride is missing, it is as if it were present with the value 1. The set of permitted values is determined on entry to the construct and is , . The expression stride must not have the value 0. If for some index-name , no forall-body-stmt is executed.

Each assignment nested within a FORALL construct assigns to memory locations specified by the forall-assignment for permitted values of the index-name variables. A program that causes multiple values to be assigned to the same location by a single statement is not HPF-conforming and therefore has no defined meaning. An HPF-conforming program may, however, assign to the same location in syntactically different assignment statements. This is a semantic constraint rather than a syntactic constraint, however; in general, it cannot be checked during compilation.



Next:
Interpretation of the Up: The FORALL Construct Previous: The FORALL Construct



©2000-2006 Rice University [ Contact Us | HiPerSoft | Computer Science ]

paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994