grk::SparseCache< T > Class Template Referenceabstract

`#include <SparseCache.h>`

Inheritance diagram for grk::SparseCache< T >:

## Public Member Functions

| SparseCache (uint64_t maxChunkSize)
virtual | ~SparseCache (void)
T * | tryGet (uint64_t index)
T * | get (uint64_t index)

## Protected Member Functions

virtual T * | create (uint64_t index)=0

## Private Attributes

std::map< uint64_t, T ** > | chunks
uint64_t | chunkSize_
T ** | currChunk_
uint64_t | currChunkIndex_

## Constructor & Destructor Documentation

## SparseCache()

template<typename T >

grk::SparseCache< T >::SparseCache | ( | uint64_t | maxChunkSize | ) |

inline

## ~SparseCache()

template<typename T >

virtual grk::SparseCache< T >::~SparseCache | ( | void |  | ) |

inline virtual

References grk::SparseCache< T >::chunks, grk::SparseCache< T >::chunkSize_, and grk::grk_read().

## Member Function Documentation

## create()

template<typename T >

virtual T * grk::SparseCache< T >::create | ( | uint64_t | index | ) |

protected pure virtual

Implemented in grk::BlockCache< T, P >, grk::BlockCache< grk::CompressCodeblock, grk::PrecinctImpl >, and grk::BlockCache< grk::DecompressCodeblock, grk::PrecinctImpl >.

Referenced by grk::SparseCache< T >::get().

## get()

template<typename T >

T * grk::SparseCache< T >::get | ( | uint64_t | index | ) |

inline

References grk::SparseCache< T >::chunks, grk::SparseCache< T >::chunkSize_, grk::SparseCache< T >::create(), grk::SparseCache< T >::currChunk_, grk::SparseCache< T >::currChunkIndex_, and grk::grk_read().

## tryGet()

template<typename T >

T * grk::SparseCache< T >::tryGet | ( | uint64_t | index | ) |

inline

References grk::SparseCache< T >::chunks, grk::SparseCache< T >::chunkSize_, grk::SparseCache< T >::currChunk_, grk::SparseCache< T >::currChunkIndex_, and grk::grk_read().

## Member Data Documentation

## chunks

template<typename T >

std::map<uint64_t, T**> grk::SparseCache< T >::chunks

private

Referenced by grk::SparseCache< T >::get(), grk::SparseCache< T >::tryGet(), and grk::SparseCache< T >::~SparseCache().

## chunkSize_

template<typename T >

uint64_t grk::SparseCache< T >::chunkSize_

private

Referenced by grk::SparseCache< T >::get(), grk::SparseCache< T >::tryGet(), and grk::SparseCache< T >::~SparseCache().

## currChunk_

template<typename T >

T** grk::SparseCache< T >::currChunk_

private

Referenced by grk::SparseCache< T >::get(), and grk::SparseCache< T >::tryGet().

## currChunkIndex_

template<typename T >

uint64_t grk::SparseCache< T >::currChunkIndex_

private

Referenced by grk::SparseCache< T >::get(), and grk::SparseCache< T >::tryGet().

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

- SparseCache.h