| United States-English |
|
|
|
![]() |
Parallel Programming Guide for HP-UX Systems: K-Class and V-Class Servers > Chapter 3 Optimization levelsHP optimization levels and features |
|
This section provides an overview of optimization features which can be through either the command-line optimization options or manual specification using pragmas or directives. Five optimization levels are available for use with the HP compiler: +O0 (the default), +O1, +O2, +O3, and +O4. These options have identical names and perform identical optimizations, regardless of which compiler you are using. They can also be specified on the compiler command line in conjunction with other options you may want to use. HP compiler optimization levels are described in Table 3-2 “Optimization levels and features”. Table 3-2 Optimization levels and features
The optimization options that control an optimization level are cumulative so that each option retains the optimizations of the previous option. For example, entering the following command line compiles the Fortran program foo.f with all +O2, +O1, and +O0 optimizations shown in Table 3-2 “Optimization levels and features”: % f90 +O2 foo.f In addition to these options, the +Oparallel option is available for use at +O3 and above; +Onoparallel is the default, When the +Oparallel option is specified, the compiler:
The +Onoautopar (no automatic parallelization) option is available for use with +Oparallel at +O3 and above. +Oautopar is the default. +Onoautopar causes the compiler to parallelize only those loops that are immediately preceded by loop_parallel or prefer_parallel directives or pragmas. For more information, refer to Chapter 9 “Parallel programming techniques”. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||