Vectorization........................................................................................................................
103
Using the +Ovectorize option............................................................................................
Controlling vectorization locally.........................................................................................
104
Calling BLAS library routines.............................................................................................
105
Controlling code generation for performance...........................................................................
106
7 Writing HP-UX applications......................................................................
107
Accessing command-line arguments........................................................................................
Calling HP-UX system and library routines................................................................................
108
Using HP-UX file I/O.............................................................................................................
Stream I/O using FSTREAM..............................................................................................
Performing I/O using HP-UX system calls.............................................................................
Establishing a connection to a file......................................................................................
Obtaining an HP-UX file descriptor.....................................................................................
109
8 Calling C routines from HP Fortran............................................................
110
Data types...........................................................................................................................
Unsigned integers............................................................................................................
111
Logicals..........................................................................................................................
Complex numbers............................................................................................................
112
Derived types..................................................................................................................
113
Pointers...........................................................................................................................
Argument-passing conventions................................................................................................
Case sensitivity.....................................................................................................................
114
Arrays.................................................................................................................................
116
Memory layout of a two-dimensional array in Fortran and C..................................................
C strings..............................................................................................................................
118
C null-terminated string.....................................................................................................
Fortran hidden length argument.........................................................................................
Passing a string...............................................................................................................
File handling........................................................................................................................
120
Sharing data........................................................................................................................
122
9 Using Fortran directives...........................................................................
123
Directive syntax....................................................................................................................
Using HP Fortran directives....................................................................................................
$HP$ ALIAS....................................................................................................................
124
$HP$ CHECK_OVERFLOW...............................................................................................
126
$HP$ LIST.......................................................................................................................
127
$HP$ OPTIMIZE..............................................................................................................
Compatibility
directives.........................................................................................................
128
Controlling
vectorization...................................................................................................
Controlling parallelization.................................................................................................
129
Controlling dependence checks.........................................................................................
Controlling checks for side effects.......................................................................................
10 Migrating to HP Fortran.........................................................................
131
Incompatibilities with HP FORTRAN 77...................................................................................
Compiler limits................................................................................................................
Command-line options not supported..................................................................................
Format field widths...........................................................................................................
132
Floating-point constants.....................................................................................................
Intrinsic functions.............................................................................................................
Procedure calls and definitions..........................................................................................
133
Data types and constants..................................................................................................
Input/output....................................................................................................................
134
Directives........................................................................................................................
Contents 5