Technical data

Optimizing with MACRO-32
3.1 VECTORIZATION
Many loops that VAX FORTRAN decomposes can also be vectorized. VAX
FORTRAN performs vectorization automatically whenever /VECTOR is
specified at compilation. VAX FORTRAN can vectorize any FORTRAN–77
Standard-conforming program; and vectorized programs can freely call
and be called by other programs (vectorized, not vectorized, and non-
FORTRAN) as long as both abide by the VAX Calling Standard.
The VAX vector architecture supports most FORTRAN language features,
as follows:
Data types: LOGICAL*4, INTEGER*4, REAL*4, REAL*8,
COMPLEX*8, and COMPLEX*16
Operators: +, -, *, /(floating point), and **
All VAX FORTRAN intrinsic functions
Although no VAX vector form exists for integer divide operations,
VAX FORTRAN vectorizes them by converting them to floating-point
operations.
3.1.1 Using Vectorization Alone
Vectorize a program using the following iterative process:
1 Using /CHECK=BOUNDS, compile, debug, and run a scalar version of
the program.
2 Compile and run the program using /VECTOR and the suitable
vector-related qualifiers.
3 Evaluate execution time and results. The results should be
algebraically equivalent to the scalar results; if not, check the
DUMMY_ALIASES or ACCURACY_SENSITIVE settings.
If performance is adequate, stop.
If performance is inadequate, you have similar options as with
autodecomposition:
Check the /SHOW=LOOPS output to see if CPU-intensive
loops vectorized. To vectorize effectively, source code must
not contain certain inhibiting constructs such as unknown
dependencies. However, you can use LSE diagnostics and add
assertions to the source code to overcome dependencies.
3–2