SCM Library
Spherical Cube Map rendering library
 All Classes Files Functions Variables Friends Pages
Public Member Functions | List of all members
scm_set Class Reference

An scm_set represents an a set of active pages, either currently in a cache or awaiting loading, with associated insertion time. More...

#include <scm-set.hpp>

Public Member Functions

scm_page search (scm_page, int)
 Search for the given page in this page set. If found, update the page entry with the current time t to indicate recent use.
 
void insert (scm_page, int)
 Add a page to this set, associated with the current time.
 
void remove (scm_page)
 Remove a page from this set.
 
scm_page eject (int, long long)
 Eject a page from this set to accommodate the addition of a new page. More...
 
bool empty () const
 Return true if the set is empty.
 

Detailed Description

An scm_set represents an a set of active pages, either currently in a cache or awaiting loading, with associated insertion time.

Member Function Documentation

scm_page scm_set::eject ( int  t,
long long  i 
)

Eject a page from this set to accommodate the addition of a new page.

The general polity is LRU, but with considerations for time and priority that help mitigate thrashing.

Parameters
tCurrent time
iPage index

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