FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
bitpack_stage.h File Reference

Bit-packing stage: packs N-bit integers into a dense byte stream. More...

#include "stage/stage.h"
#include "fzm_format.h"
#include <cuda_runtime.h>
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <vector>

Go to the source code of this file.

Classes

class  fz::BitpackStage< T >
 

Detailed Description

Bit-packing stage: packs N-bit integers into a dense byte stream.

Supported input types: uint8_t, uint16_t, uint32_t. Output is always uint8_t[] (byte-transparent to downstream stages).

nbits must be a power of two and satisfy 1 <= nbits <= 8*sizeof(T). Allowed values per type: uint8_t : 1, 2, 4, 8 uint16_t : 1, 2, 4, 8, 16 uint32_t : 1, 2, 4, 8, 16, 32

Serialized header layout (10 bytes): [0] DataType of T (1 byte) [1] nbits (1 byte) [2..9] num_elements (uint64_t, little-endian)

num_elements is written during forward compression and used by the inverse to know how many elements to unpack (byte count alone is ambiguous).