Prefetching Support

The PREFETCH and NOPREFTCH directives assert that the data prefetches be generated or not generated for some memory references. This affects the heuristics used in the compiler.

The syntax for this directive is:

CDEC$ PREFETCH or !DEC$ PREFETCH

CDEC$ NOPRFETCH or !DEC$ NOPREFETCH

CDEC$ PREFETCH a,b or !DEC$ PREFETCH a,b

CDEC$ NOPREFETCH a,b or !DEC$ NOPREFETCH a,b

If loop includes expression a(j), placing  PREFETCH a in front of the loop, instructs the compiler to insert prefetches for a(j + d) within the loop. d is determined by the compiler. This directive is supported when option -O3 is on.

PREFETCH

CDEC$ NOPREFETCH c
CDEC$ PREFETCH a
do i = 1, m
b(i) = a(c(i)) + 1
enddo