Go to the documentation of this file. 1 #ifndef vtkExodusIICache_h
2 #define vtkExodusIICache_h
26 #include "vtkIOExodusModule.h"
70 if ( pattern.
Time && this->Time != other.
Time )
82 if ( this->Time < other.
Time )
84 else if ( this->Time > other.
Time )
88 else if ( this->ObjectType > other.
ObjectType )
90 if ( this->ObjectId < other.
ObjectId )
92 else if ( this->ObjectId > other.
ObjectId )
94 if ( this->ArrayId < other.
ArrayId )
145 {
return this->Capacity - this->Size; }
209 #endif // vtkExodusIICache_h
vtkExodusIICacheEntry(vtkDataArray *arr)
~vtkExodusIICache()
Destructor.
vtkExodusIICacheLRURef LRUEntry
int Invalidate(vtkExodusIICacheKey key)
Invalidate a cache entry (drop it from the cache) if the key exists.
bool match(const vtkExodusIICacheKey &other, const vtkExodusIICacheKey &pattern) const
vtkExodusIICacheEntry(const vtkExodusIICacheEntry &other)
abstract base class for most VTK objects
abstract superclass for arrays of numeric data
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
void Insert(vtkExodusIICacheKey &key, vtkDataArray *value)
Insert an entry into the cache (this can remove other cache entries to make space).
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * >::iterator vtkExodusIICacheRef
vtkExodusIICacheKey(const vtkExodusIICacheKey &src)
int ReduceToSize(double newSize)
Remove cache entries until the size of the cache is at or below the given size.
std::list< vtkExodusIICacheRef > vtkExodusIICacheLRU
static vtkExodusIICache * New()
std::list< vtkExodusIICacheRef >::iterator vtkExodusIICacheLRURef
a simple class to control print indentation
vtkExodusIICacheKey(int time, int objType, int objId, int arrId)
vtkDataArray * GetValue()
vtkDataArray *& Find(vtkExodusIICacheKey)
Determine whether a cache entry exists.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
double GetSpaceLeft()
See how much cache space is left.
double Capacity
The capacity of the cache (i.e., the maximum size of all arrays it contains) in MiB.
vtkExodusIICacheSet Cache
A least-recently-used (LRU) cache to hold arrays.
double Size
The current size of the cache (i.e., the size of the all the arrays it currently contains) in MiB.
void SetCacheCapacity(double sizeInMiB)
Set the maximum allowable cache size. This will remove cache entries if the capacity is reduced below...
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * > vtkExodusIICacheSet
vtkExodusIICacheLRU LRU
The actual LRU list (indices into the cache ordered least to most recently used).
int Invalidate(vtkExodusIICacheKey key, vtkExodusIICacheKey pattern)
Invalidate all cache entries matching a specified pattern, dropping all matches from the cache.
vtkExodusIICache()
Default constructor.
void RecomputeSize()
Avoid (some) FP problems.
void Clear()
Empty the cache.