prefetch.hh File Reference

Go to the source code of this file.

Functions

template<int temporalLocality = 3, int writeOnly = 0, class T = void>
void Ewoms::prefetch (const T &val, unsigned n=1)
 Template function which emits prefetch instructions for a range of memory. More...
 

Detailed Description

Function Documentation

◆ prefetch()

template<int temporalLocality = 3, int writeOnly = 0, class T = void>
void Ewoms::prefetch ( const T &  val,
unsigned  n = 1 
)

Template function which emits prefetch instructions for a range of memory.

This function does not change the semantics of the code, but used correctly it will improve performace because the number of cache misses will be reduced.