8#include "FilterCachingAlgorithm.h"
17#include "RawCubeChunk.h"
18#include "Statistics.h"
64 QList<RawCubeChunk *> allocated, QList<RawCubeChunk *> justUsed,
65 const Buffer &justRequested) {
66 QList<RawCubeChunk *> chunksToToss;
70 if(!justUsed.size() ||
80 QListIterator<RawCubeChunk *> allocatedIterator(allocated);
82 while(allocatedIterator.hasNext()) {
89 found = chunksForIo.indexOf(chunk) != -1;
93 chunksToToss.append(chunk);
Buffer for reading and writing cube data.
This stores the results of the caching algorithm.
int m_currentIo
This keeps track of our position inside of m_chunksToKeep.
QList< QList< RawCubeChunk * > > * m_chunksToKeep
This is stored from parallel read # -> list of chunks for that read.
virtual CacheResult recommendChunksToFree(QList< RawCubeChunk * > allocated, QList< RawCubeChunk * > justUsed, const Buffer &justRequested)
Please see the class description for how this algorithm works.
FilterCachingAlgorithm(int numParallelIOs)
Construct a new FilterCachingAlgorithm.
virtual ~FilterCachingAlgorithm()
Frees the memory allocated by this caching algorithm.
A section of raw data on the disk.
This is free and unencumbered software released into the public domain.