Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

qopt-prefetch-distance, Qopt-prefetch-distance (ifx only)

Specifies the prefetch distance to be used for compiler-generated prefetches inside loops. This description is only for ifx.

Syntax

Linux:

-qopt-prefetch-distance=n

Windows:

/Qopt-prefetch-distance:n

Arguments

n

Is the prefetch distance in terms of the number of (possibly-vectorized) iterations. Possible values are non-negative numbers >=0.

n = 0 turns off all compiler issued prefetches from memory to L1.

Default

OFF

The compiler uses default heuristics to determine the prefetch distance.

Description

This option specifies the prefetch distance to be used for compiler-generated prefetches inside loops. The unit n is the number of iterations. If the loop is vectorized by the compiler, the unit is the number of vectorized iterations.

The value of n will be used as the distance for prefetches from memory to L1 (for example, the vprefetch0 instruction).

Linux

This option is ignored if option -qopt-prefetch=0 or option -qno-opt-prefetch is specified.

Windows

This option is ignored if option /Qopt-prefetch=0 or option /Qopt-prefetch- is specified.

IDE Equivalent

None

Alternate Options

None

Examples

Consider the following Linux examples:

-qopt-prefetch-distance=24

The above causes the compiler to use a distance of 24 iterations for memory to L1 prefetches.

-qopt-prefetch-distance=0

The above turns off all memory to L1 prefetches inserted by the compiler inside loops.

-qopt-prefetch-distance=16

The above causes the compiler to use a distance of 16 iterations for memory to L1 prefetches.

See Also