XBNF
forall-stmt -to -rule
to
forall-header -to -rule
to
Note that functions referenced in the forall-triplet-spec-list
are not syntactically constrained as the scalar-mask-expr is.
This is consistent with the handling of bounds expressions in DO
loops.
(End of rationale.)
XBNF
forall-triplet-spec -to -rule
to
XBNF
forall-assignment -to -rule
to
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
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.
to is FORALL forall-header forall-assignment
to is ( forall-triplet-spec-list [ , scalar-mask-expr ] )
XBNF
.
to is index-name = subscript : subscript [ : stride ]
XBNF
to is assignment-stmt
-to or pointer-assignment-stmt
XBNF
.
be first subscript (``lower bound'');
be second subscript (``upper bound'');
be the stride; and
be
.
,
. If
for some index-name, the forall-assignment is not executed.
Next: Interpretation of Element
Up: The FORALL Statement
Previous: The FORALL Statement