24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

-qhot Option<br />

Syntax<br />

-qhot[=suboptions] | -qnohot<br />

HOT[=suboptions] | NOHOT<br />

The -qhot compiler option is a powerful alternative to hand tuning that provides<br />

opportunities to optimize loops and array language. The -qhot compiler option<br />

will always attempt to optimize loops, regardless of the suboptions you specify.<br />

If you do not specify an optimization level of 2 or higher when using -O and<br />

-qhot, the compiler assumes -O2.<br />

For additional in<strong>for</strong>mation on loop unrolling, see the Directives <strong>for</strong> Loop<br />

Optimization section in the <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> Language Reference.<br />

Array Padding: In <strong>XL</strong> <strong>Fortran</strong>, array dimensions that are powers of two can lead<br />

to a decrease in cache utilization. The arraypad suboption allows the compiler to<br />

increase the dimensions of arrays where doing so could improve the efficiency of<br />

array-processing loops. This can reduce cache misses and page faults that slow<br />

your array processing programs.<br />

Specify -qhot=arraypad when your source includes large arrays with dimensions<br />

that are powers of 2. This can be particularly effective when the first dimension is<br />

a power of 2.<br />

The -C option turns off some array optimizations.<br />

Vectorization: The -qhot compiler option supports the vector suboption that can<br />

optimize loops in source code <strong>for</strong> operations on array data, by ensuring that<br />

operations run in parallel where applicable. The compiler uses standard registers<br />

with no vector size restrictions. Supporting single and double-precision<br />

floating-point mathematics, users can typically see benefit when applying<br />

–qhot=vector to applications with significant mathematical requirements.<br />

Arguments<br />

arraypad<br />

The compiler pads any arrays where there could be an increase in cache<br />

utilization. Not all arrays will necessarily be padded, and the compiler can<br />

pad different arrays by different amounts.<br />

arraypad=n<br />

The compiler pads each array in the source. The pad amount must be a<br />

positive integer value. Each array will be padded by an integral number of<br />

elements. The integral value n must be multiples of the largest array<br />

element size <strong>for</strong> effective use of arraypad. This value is typically 4, 8, or 16.<br />

When you specify the arraypad and arraypad=n options, the compiler does not<br />

check <strong>for</strong> reshaping or equivalences. If padding takes place, your program can<br />

produce unexpected results.<br />

vector | novector<br />

The compiler converts certain operations in a loop that apply to successive<br />

elements of an array into a call to a routine that is in the libxlopt.a library.<br />

This call calculates several results at one time, which is faster than<br />

calculating each result sequentially.<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!