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



Next:
Interpretation of Element Up: The FORALL Statement Previous: The FORALL Statement

General Form of Element Array Assignment

XBNF forall-stmt -to -rule to to is FORALL forall-header forall-assignment

forall-header -to -rule to to is ( forall-triplet-spec-list [ , scalar-mask-expr ] ) XBNF

XBNF forall-triplet-spec -to -rule to to is index-name = subscript : subscript [ : stride ] XBNF

XBNF forall-assignment -to -rule to to is assignment-stmt -to or pointer-assignment-stmt XBNF

To determine the set of permitted values for each index-name in the forall-header, 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. Stride must not have the value 0. The set of permitted values is determined on entry to the statement and is , . If for some index-name, the forall-assignment is not executed.

A FORALL statement 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 is not HPF-conforming and therefore has no defined meaning. This is a semantic constraint rather than a syntactic constraint, however; in general, it cannot be checked during compilation.



Next:
Interpretation of Element Up: The FORALL Statement Previous: The FORALL Statement



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

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