### 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:

- Prefixes beginning with C (or c) and * are only allowed in fixed or tab source forms.

  In these source forms, the prefix must appear in columns 1 through 5; column 6 must be a blank or tab. From column 7 on, blanks are insignificant, so the directive can be positioned anywhere on the line after column 6. A directive ends in column 72 (or column 132, if a compiler option is specified).

- Prefixes beginning with ! are allowed in all source forms.

  In fixed and tab source forms, a prefix beginning with ! must follow the same rules for prefixes beginning with C, c, or * (see above).

  In free source form, the prefix need not start in column 1, but it cannot be preceded by any nonblank characters on the same line. It can only be preceded by whitespace.

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