Next: DISTRIBUTE and REDISTRIBUTE Up: Data Alignment and Previous: Model
Specification directives in HPF have two forms: specification statements, analogous to the DIMENSION and ALLOCATABLE statements of Fortran 90; and an attribute form analogous to type declaration statements in Fortran 90 using the ``::'' punctuation.
The attribute form allows more than one attribute to be described in a single directive. HPF goes beyond Fortran 90 in not requiring that the first attribute, or indeed any of them, be a type specifier.
For syntactic convenience, the executable directives REALIGN and REDISTRIBUTE also come in two forms (statement form and attribute form) but may not be combined with other attributes in a single directive.
XBNF combined-directive -to -rule to to is combined-attribute-list :: entity-decl-list
combined-attribute -to -rule to to is ALIGN align-attribute-stuff -to or DISTRIBUTE dist-attribute-stuff -to or DYNAMIC -to or INHERIT -to or TEMPLATE -to or PROCESSORS -to or DIMENSION ( explicit-shape-spec-list ) XBNF
The following rules constrain the declaration of various attributes, whether in separate directives or in a combined-directive.
The HPF keywords PROCESSORS and TEMPLATE play the role of type specifiers in declaring processor arrangements and templates. The HPF keywords ALIGN, DISTRIBUTE, DYNAMIC, and INHERIT play the role of attributes. Attributes referring to processor arrangements, to templates, or to entities with other types (such as REAL) may be combined in an HPF directive without having the type specifier appear.
Dimension information may be specified after an object-name or in a DIMENSION attribute. If both are present, the one after the object-name overrides the DIMENSION attribute (this is consistent with the Fortran 90 standard). For example, in: !HPF TEMPLATE,DIMENSION(64,64) :: A,B,C(32,32),D A, B, and D are templates; C is .
A comment on asterisks: The asterisk character ``*'' appears in the syntax rules for HPF alignment and distribution directives in three distinct roles: