QMCPACK
PrefetchedRange Class Reference

helper class for the prefetched range of a vector More...

+ Collaboration diagram for PrefetchedRange:

Public Member Functions

 PrefetchedRange ()
 
void setRange (int first_in, int last_in)
 
void clear ()
 
int getOffset (int index) const
 
bool checkRange (int index) const
 

Private Attributes

int first
 
int last
 

Detailed Description

helper class for the prefetched range of a vector

Definition at line 18 of file PrefetchedRange.h.

Constructor & Destructor Documentation

◆ PrefetchedRange()

PrefetchedRange ( )
inline

Member Function Documentation

◆ checkRange()

bool checkRange ( int  index) const
inline

◆ clear()

◆ getOffset()

int getOffset ( int  index) const
inline

Definition at line 31 of file PrefetchedRange.h.

References PrefetchedRange::checkRange(), and PrefetchedRange::first.

Referenced by DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateCUDA< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), and DelayedUpdateCUDA< T, T_FP >::getInvRow().

32  {
33  if (!checkRange(index))
34  throw std::runtime_error("index not in range \n");
35  return index - first;
36  }
bool checkRange(int index) const

◆ setRange()

void setRange ( int  first_in,
int  last_in 
)
inline

Member Data Documentation

◆ first

◆ last

int last
private

The documentation for this class was generated from the following file: