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

Adaptive Data Mapping (ADM) stage — remaps u16/u32 integer streams into a compact 8-bit symbol domain before entropy coding. More...

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

Go to the source code of this file.

Namespaces

namespace  fz
 

Enumerations

enum class  fz::ADMDtype : uint8_t
 

Detailed Description

Adaptive Data Mapping (ADM) stage — remaps u16/u32 integer streams into a compact 8-bit symbol domain before entropy coding.

Forward: uint16_t[] or uint32_t[] → opaque ADM payload (uint8_t[]). Inverse: ADM payload → original integer array.

ADM partitions the input into 512-element warp blocks, computes a per-warp center (mean), and encodes each element as a compact (code, unary-signal) pair. The resulting byte codes are compressible by ANSStage with a much better ratio than the raw integer stream.

D2H copies occur in both directions, so isGraphCompatible() returns false.

Serialized FZM header layout (12 bytes): [0] dtype (0=U16, 1=U32) [1..3] reserved (zero) [4..11] num_elements (uint64_t LE; element count of the uncompressed input)

Note
ADM algorithm adapted from the MANS project (Huang et al., BSD-3-Clause). See THIRD_PARTY.md for the full license text and attribution.