HPCToolkit
TraceviewerServer::LRUList< T > Class Template Reference

#include <LRUList.hpp>

Collaboration diagram for TraceviewerServer::LRUList< T >:

Public Member Functions

 LRUList (int expectedMaxSize)
 
int addNew (T *toAdd)
 
int addNewUnused (T *toAdd)
 
void putOnTop (int index)
 
TgetLast ()
 
void removeLast ()
 
void reAdd (int index)
 
int getTotalPageCount ()
 
int getUsedPageCount ()
 
virtual ~LRUList ()
 

Private Attributes

int totalPages
 
int usedPages
 
int currentFront
 
list< T * > useOrder
 
list< T * > removed
 
vector< typename list< T * >::iterator > iters
 

Detailed Description

template<typename T>
class TraceviewerServer::LRUList< T >

Definition at line 75 of file LRUList.hpp.

Constructor & Destructor Documentation

◆ LRUList()

template<typename T>
TraceviewerServer::LRUList< T >::LRUList ( int  expectedMaxSize)
inline

It's a special data structure that uses a little extra memory in exchange for all operations running in constant time. Objects are added to the data structure and given an index that identifies them. Once added, objects are not deleted; they are either on the "in use" list, which for VersatileMemoryPage corresponds to being mapped, or they are on the "not in use" list, which corresponds to not being mapped. An object must only be added with addNew() once. If it is removed from the list with remove(), it must be added with reAdd(). It is not necessary to call putOnTop() after adding an element as it will already be on top.

Definition at line 95 of file LRUList.hpp.

◆ ~LRUList()

template<typename T>
virtual TraceviewerServer::LRUList< T >::~LRUList ( )
inlinevirtual

Definition at line 151 of file LRUList.hpp.

Member Function Documentation

◆ addNew()

template<typename T>
int TraceviewerServer::LRUList< T >::addNew ( T toAdd)
inline

Definition at line 102 of file LRUList.hpp.

Here is the caller graph for this function:

◆ addNewUnused()

template<typename T>
int TraceviewerServer::LRUList< T >::addNewUnused ( T toAdd)
inline

Definition at line 111 of file LRUList.hpp.

Here is the caller graph for this function:

◆ getLast()

template<typename T>
T* TraceviewerServer::LRUList< T >::getLast ( )
inline

Definition at line 126 of file LRUList.hpp.

Here is the caller graph for this function:

◆ getTotalPageCount()

template<typename T>
int TraceviewerServer::LRUList< T >::getTotalPageCount ( )
inline

Definition at line 143 of file LRUList.hpp.

Here is the caller graph for this function:

◆ getUsedPageCount()

template<typename T>
int TraceviewerServer::LRUList< T >::getUsedPageCount ( )
inline

Definition at line 147 of file LRUList.hpp.

Here is the caller graph for this function:

◆ putOnTop()

template<typename T>
void TraceviewerServer::LRUList< T >::putOnTop ( int  index)
inline

Definition at line 118 of file LRUList.hpp.

Here is the caller graph for this function:

◆ reAdd()

template<typename T>
void TraceviewerServer::LRUList< T >::reAdd ( int  index)
inline

Definition at line 136 of file LRUList.hpp.

Here is the caller graph for this function:

◆ removeLast()

template<typename T>
void TraceviewerServer::LRUList< T >::removeLast ( )
inline

Definition at line 131 of file LRUList.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ currentFront

template<typename T>
int TraceviewerServer::LRUList< T >::currentFront
private

Definition at line 79 of file LRUList.hpp.

◆ iters

template<typename T>
vector<typename list<T*>::iterator> TraceviewerServer::LRUList< T >::iters
private

Definition at line 82 of file LRUList.hpp.

◆ removed

template<typename T>
list<T*> TraceviewerServer::LRUList< T >::removed
private

Definition at line 81 of file LRUList.hpp.

◆ totalPages

template<typename T>
int TraceviewerServer::LRUList< T >::totalPages
private

Definition at line 77 of file LRUList.hpp.

◆ usedPages

template<typename T>
int TraceviewerServer::LRUList< T >::usedPages
private

Definition at line 78 of file LRUList.hpp.

◆ useOrder

template<typename T>
list<T*> TraceviewerServer::LRUList< T >::useOrder
private

Definition at line 80 of file LRUList.hpp.


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