quadiron icon indicating copy to clipboard operation
quadiron copied to clipboard

Buffers stores data and meta

Open lamphamsy opened this issue 6 years ago • 0 comments

Buffers consists of a vector of n DATA buffers (array of T) and an OPTIONAL vector of n META buffers (array of uint8_t). A meta buffer corresponds to a data buffer. Every s-byte data element of a data buffer corresponds to an s-bit element of the meta buffer. A pair of data and meta elements can represent an integer of 8*s + s-bits Each data element points to a buffer of size m * sizeof(T) bytes. Hence, each meta element points to a buffer of size bsize = m * sizeof(T) / 8 bytes that should be an integer, i.e. m * sizeof(T) % 8 = 0. This condition is not difficult to achieve as a convenient size can be always chosen with a negligible impact on its application.

lamphamsy avatar May 09 '19 16:05 lamphamsy