Grok  7.6.2
Classes | Namespaces
SparseBuffer.h File Reference

Sparse array management. More...

#include <cstdint>

Go to the source code of this file.

Classes

class  grk::ISparseBuffer
 
class  grk::SparseBuffer< LBW, LBH >
 

Namespaces

 grk
 Copyright (C) 2016-2020 Grok Image Compression Inc.
 

Detailed Description

Sparse array management.

The functions in this file manage sparse arrays. Sparse arrays are arrays with potentially large dimensions, but with very few samples actually set. Such sparse arrays require allocating a small amount of memory, by just allocating memory for blocks of the array that are set. The minimum memory allocation unit is a a block. There is a trade-off to pick up an appropriate dimension for blocks. If it is too big, and pixels set are far from each other, too much memory will be used. If blocks are too small, the book-keeping costs of blocks will rise.