Isis 3 Programmer Reference
Isis::UniqueIOCachingAlgorithm Class Reference

This algorithm is designed for applications that jump around between a couple of spots in the cube with a difficult to predict pattern but always the same places in the cube. More...

#include <UniqueIOCachingAlgorithm.h>

Inheritance diagram for Isis::UniqueIOCachingAlgorithm:
Inheritance graph
Collaboration diagram for Isis::UniqueIOCachingAlgorithm:
Collaboration graph

Public Member Functions

 UniqueIOCachingAlgorithm (int numUniqueIOs)
 Construct a new UniqueIOCachingAlgorithm. More...
 
virtual ~UniqueIOCachingAlgorithm ()
 Frees the memory allocated by this caching algorithm. More...
 
virtual CacheResult recommendChunksToFree (QList< RawCubeChunk * > allocated, QList< RawCubeChunk * > justUsed, const Buffer &justRequested)
 Please see the class description for how this algorithm works. More...
 

Private Attributes

QQueue< QList< RawCubeChunk * > > * m_uniqueIOs
 This is the set of past unique IOs. More...
 

Detailed Description

This algorithm is designed for applications that jump around between a couple of spots in the cube with a difficult to predict pattern but always the same places in the cube.

This was designed for ProcessMosaic which jumps between band 1 and band n in the possible patterns (where A is a line on band 1 and B is a line on band N): A,A or A,B,A or A,B,B,A

Author
????-??-?? Jai Rideout and Steven Lambright

Definition at line 30 of file UniqueIOCachingAlgorithm.h.

Constructor & Destructor Documentation

◆ UniqueIOCachingAlgorithm()

Isis::UniqueIOCachingAlgorithm::UniqueIOCachingAlgorithm ( int  numUniqueIOs)

Construct a new UniqueIOCachingAlgorithm.

The last numUniqueIOs will be kept in the cache, while the other chunks in the cache will all be tossed.

Parameters
numUniqueIOsThe number of unique IO operations to keep the chunks around for.

Definition at line 29 of file UniqueIOCachingAlgorithm.cpp.

References m_uniqueIOs, and Isis::IException::Programmer.

◆ ~UniqueIOCachingAlgorithm()

Isis::UniqueIOCachingAlgorithm::~UniqueIOCachingAlgorithm ( )
virtual

Frees the memory allocated by this caching algorithm.

Definition at line 47 of file UniqueIOCachingAlgorithm.cpp.

References m_uniqueIOs.

Member Function Documentation

◆ recommendChunksToFree()

CubeCachingAlgorithm::CacheResult Isis::UniqueIOCachingAlgorithm::recommendChunksToFree ( QList< RawCubeChunk * >  allocated,
QList< RawCubeChunk * >  justUsed,
const Buffer justRequested 
)
virtual

Please see the class description for how this algorithm works.

Parameters
allocatedAll of the allocated cube chunks
justUsedThe cube chunks used in the last I/O
justRequestedThe buffer passed into the last I/O
Returns
The chunks that should be removed from memory

Implements Isis::CubeCachingAlgorithm.

Definition at line 65 of file UniqueIOCachingAlgorithm.cpp.

References m_uniqueIOs.

Member Data Documentation

◆ m_uniqueIOs

QQueue< QList <RawCubeChunk *> >* Isis::UniqueIOCachingAlgorithm::m_uniqueIOs
private

This is the set of past unique IOs.

All chunks not in this set of lists are freed from memory.

Definition at line 44 of file UniqueIOCachingAlgorithm.h.

Referenced by recommendChunksToFree(), UniqueIOCachingAlgorithm(), and ~UniqueIOCachingAlgorithm().


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