General directives accepted by f95 are described in 2.3 Directives.
Table D–1 Summary of General Fortran Directives
Format |
|
C$PRAGMA keyword ( a [ , a ] … ) [ , keyword ( a [ , a ] … ) ] ,… C$PRAGMA SUN keyword ( a [ , a ] … ) [ , keyword ( a [ , a ] … ) ] ,… C$PRAGMA SPARC keyword ( a [ , a ] … ) [ , keyword ( a [ , a ] … ) ] ,… Comment-indicator in column 1 may be c, C, !, or *. (We use C in these examples. f95 free-format must use !.) |
|
C Directive |
C$PRAGMA C(list) Declares a list of names of external functions as C language routines. |
IGNORE_TKR Directive |
C$PRAGMA IGNORE_TKR {name {, name} ...} The compiler ignores the type, kind, and rank of the specified dummy argument names appearing in a generic procedure interface when resolving a specific call. |
UNROLL Directive |
C$PRAGMA SUN UNROLL=n Advises the compiler that the following loop can be unrolled to a length n. |
WEAK Directive |
C$PRAGMA WEAK(name[=name2]) Declares name to be a weak symbol, or an alias for name2. |
OPT Directive |
C$PRAGMA SUN OPT=n Set optimization level for a subprogram to n. |
NOMEMDEP Directive |
C$PRAGMA SUN NOMEMDEP Assert there are no memory dependencies in the following loop. (Requires -parallel or -explicitpar.) |
PIPELOOP Directive |
C$PRAGMA SUN PIPELOOP=n Assert dependency in loop between iterations n apart. |
PREFETCH Directives |
C$PRAGMA SUN_PREFETCH_READ_ONCE (name) C$PRAGMA SUN_PREFETCH_READ_MANY (name) C$PRAGMA SUN_PREFETCH_WRITE_ONCE (name) C$PRAGMA SUN_PREFETCH_WRITE_MANY (name) Request compiler generate prefetch instructions for references to name. (Requires -xprefetch option, which is enabled by default. Prefetch directives can be disabled by compiling with —xprefetch=no. Target architecture must also support prefetch instructions, and the compiler optimization level must be set greater than —xO2.) |
ASSUME Directives |
C$PRAGMA [BEGIN} ASSUME (expression [,probability]) C$PRAGMA END ASSUME Make assertions about conditions at certain points in the program that the compiler can assume are true. |