Description and restrictions
The $HP$ OPTIMIZEdirective allows you to determine which areas of your program that the optimizer will process. Specifying $HP$ OPTIMIZE OFFcauses the following source lines not to be optimized. $HP$ OPTIMIZE
This directive is effective only if you have used either the
The following are supported:
!HP$ OPTIMIZE ON
!HP$ OPTIMIZE OFF !HP$ OPTIMIZE level 1 !HP$ OPTIMIZE level 0 !HP$ OPTIMIZE level 2 !HP$ OPTIMIZE level 1 on !HP$ OPTIMIZE level 0 on !HP$ OPTIMIZE level 2 on !HP$ OPTIMIZE level 1 off !HP$ OPTIMIZE level 0 off !HP$ OPTIMIZE level 2 off
!HP$ optimize assume_no_parameters_overlaps on !HP$ optimize assume_no_parameters_overlaps off
Compatibility directives
HP Fortran supports the compiler directives listed in Table
Table 36 Compatibility directives recognized by HP Fortran
Vendor | Directive |
Cray | DIR$ NO SIDE EFFECTS |
|
|
| DIR$ [NO]CONCUR |
|
|
| DIR$ IVDEP |
|
|
| FPP$ NODEPCHK |
|
|
KAP | *$* [NO]CONCURRENTIZE |
|
|
| *$* [NO]VECTORIZE |
|
|
VAST | VD$ NODEPCHK |
|
|
In fixed format, each directive must be preceded by the comment character C, !, or *and must begin in column 1 of the source file. In free format, the directive must be preceded by the Fortran comment character(!).
If an option or argument is included with the directive name, the compiler ignores the directive.
The following sections describes these directives in detail.
Controlling vectorization
HP Fortran can vectorize eligible program loops that operate on vectors. This optimization causes the compiler to replace the loops with calls to selected routines in the Basic Linear Algebra Subroutine (BLAS) library. You can use the *$*[NO]VECTORIZEdirective to enable or disable vectorization. The compiler considers the *$* VECTORIZEdirective as a request to vectorize a loop. If the compiler determines that it cannot profitably or safely vectorize the loop, it ignores the directive.
To use the vectorization directive, you must compile and link with the +Ovectorizeoption. The directive applies to the beginning of the next loop and remains in effect for the rest of the program
128 Using Fortran directives