Isis 3 Programmer Reference
Isis::FilterCachingAlgorithm Class Reference

This algorithm is designed for applications that use ProcessByQuickFilter or very similar I/O patterns to cache cube data appropriately. More...

#include <FilterCachingAlgorithm.h>

Inheritance diagram for Isis::FilterCachingAlgorithm:
Inheritance graph
Collaboration diagram for Isis::FilterCachingAlgorithm:
Collaboration graph

Public Member Functions

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

Private Attributes

QList< QList< RawCubeChunk * > > * m_chunksToKeep
 This is stored from parallel read # -> list of chunks for that read.
 
int m_currentIo
 This keeps track of our position inside of m_chunksToKeep.
 

Detailed Description

This algorithm is designed for applications that use ProcessByQuickFilter or very similar I/O patterns to cache cube data appropriately.

The last numParallelIOs worth of I/Os will be left in the cache.

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

Definition at line 23 of file FilterCachingAlgorithm.h.

Constructor & Destructor Documentation

◆ FilterCachingAlgorithm()

Isis::FilterCachingAlgorithm::FilterCachingAlgorithm ( int numParallelIOs)

Construct a new FilterCachingAlgorithm.

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

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

Definition at line 31 of file FilterCachingAlgorithm.cpp.

References m_chunksToKeep, and m_currentIo.

◆ ~FilterCachingAlgorithm()

Isis::FilterCachingAlgorithm::~FilterCachingAlgorithm ( )
virtual

Frees the memory allocated by this caching algorithm.

Definition at line 45 of file FilterCachingAlgorithm.cpp.

References m_chunksToKeep.

Member Function Documentation

◆ recommendChunksToFree()

CubeCachingAlgorithm::CacheResult Isis::FilterCachingAlgorithm::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 63 of file FilterCachingAlgorithm.cpp.

References m_chunksToKeep, and m_currentIo.

Member Data Documentation

◆ m_chunksToKeep

QList< QList< RawCubeChunk * > >* Isis::FilterCachingAlgorithm::m_chunksToKeep
private

This is stored from parallel read # -> list of chunks for that read.

All chunks not in this list are freed from memory.

Definition at line 37 of file FilterCachingAlgorithm.h.

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

◆ m_currentIo

int Isis::FilterCachingAlgorithm::m_currentIo
private

This keeps track of our position inside of m_chunksToKeep.

Definition at line 42 of file FilterCachingAlgorithm.h.

Referenced by FilterCachingAlgorithm(), and recommendChunksToFree().


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