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.
Buffers
consists of a vector ofn
DATA buffers (array of T) and an OPTIONAL vector ofn
META buffers (array ofuint8_t
). A meta buffer corresponds to a data buffer. Everys
-byte data element of a data buffer corresponds to ans
-bit element of the meta buffer. A pair of data and meta elements can represent an integer of8*s + s
-bits Each data element points to a buffer of sizem * sizeof(T)
bytes. Hence, each meta element points to a buffer of sizebsize = 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 convenientsize
can be always chosen with a negligible impact on its application.