15.3.1 Syntax Rules for HPF Directives (TU*X only)

The following general syntax rules apply to all HPF compiler directives. You must follow these rules precisely to compile your program properly and get meaningful results.

An HPF directive prefix (tag) takes the following form:

cHPF$

c
Is one of the following: !, C (or c), or *.

The following are source form rules for directive prefixes:

Multiple HPF directives cannot be combined on one line. However, nondirective comments can follow an HPF directive on the same line.

At least one blank must appear between adjacent keywords or between adjacent keywords and variable names.

A blank must not appear in the middle of a keyword or variable name.

HPF directives can be continued and comments can be mixed within a continued HPF directive. The directive prefix must appear on each line of a continued directive.

HPF directives cannot appear within a continued Fortran statement.

Fortran statements cannot appear within a continued HPF directive.

Examples

The following examples show the correct use of HPF directives:

 !HPF$ DISTRIBUTE (BLOCK,*) :: X, Y, Z     !A comment can follow a directive

      REAL PERIODIC_TABLE(103)             !Directives cannot be preceded by
 !HPF$ DISTRIBUTE PERIODIC_TABLE(CYCLIC)   !nonblanks; split to two lines

 !HPF$ DISTRIBUTE PERIODIC_TABLE(CYCLIC)   !Multiple directives cannot be on
 !HPF$ DISTRIBUTE LOG_TABLE(BLOCK)         !the same line

 !HPF$ ALIGN ANTIDISESTABLISHMENTARIANISM(I,J,K)    &      !A free source form
 !HPF$         WITH ORNITHORHYNCHUS_ANATINUS(J,K,I)        !directive continuation

 !HPF$ ALIGN ANTIDISESTABLISHMENTARIANISM(I,J,K)           !A fixed source form
 !HPF$*WITH ORNITHORHYNCHUS_ANATINUS(J,K,I)                !directive continuation

 !HPF$ ALIGN ANTIDISESTABLISHMENTARIANISM(I,J,K)
 !Comments can be embedded within directive continuations
 !HPF$\ORNITHORHYNCHUS_ANATINUS(J,K,I)


Previous Page Next Page Table of Contents