|
FZGPUModules 2.0
GPU-accelerated modular compression pipelines
|
#include <quantizer.h>
Public Attributes | |
| double | error_bound = 1e-4 |
Error bound (interpretation set by eb_mode). | |
| int | quant_radius = 32768 |
| Quantization radius. | |
| float | outlier_capacity = 0.05f |
| Fraction of input size reserved for outliers. | |
| float | precomputed_value_base = 0.0f |
| Pre-computed value_base > 0 to skip the NOA data scan; 0 = auto. | |
| bool | zigzag_codes = false |
| float | outlier_threshold = std::numeric_limits<float>::infinity() |
ABS/NOA: |x| >= threshold → lossless outlier (LC reference threshold). Default: ∞. | |
| bool | inplace_outliers = false |
| bool | linear_mode = false |
| bool | linear_high_precision = false |
| bool | power_of_two_bound = false |
| bool | dither = false |
| uint64_t | dither_seed = 0 |
| float | dither_strength = 1.0f |
Construction parameters.
| bool fz::QuantizerStage< TInput, TCode >::Config::zigzag_codes = false |
ABS/NOA: zigzag-encode codes before storage to improve compressibility. No effect in REL mode (log-space codes are already unsigned).
| bool fz::QuantizerStage< TInput, TCode >::Config::inplace_outliers = false |
ABS/NOA: write outlier raw float bits in-place in the codes array. Removes the scatter buffers; inverse checks (code >> 1) >= quant_radius. Must NOT be used with REL mode.
| bool fz::QuantizerStage< TInput, TCode >::Config::linear_mode = false |
ABS/NOA: linear / no-outlier mode (cuSZp-style). Emits raw signed codes (q = round(x / 2·eb), stored two's-complement in TCode and declared as the signed DataType), with NO radius clamp, NO outlier ports, NO zigzag — a value outside TCode range is rejected, so size TCode wide enough (use uint32_t). Intended front-end for → LorenzoStage(blockSize=32) → AdaptiveBitpackStage. Mutually exclusive with REL, inplace_outliers, and zigzag_codes.
| bool fz::QuantizerStage< TInput, TCode >::Config::linear_high_precision = false |
Linear mode only: evaluate x/(2*abs_eb) with a precomputed double reciprocal and double multiply. For non-power-of-two bounds the stage also tightens its internal bound enough to absorb final TInput reconstruction rounding, making the user bound a strict guarantee.
| bool fz::QuantizerStage< TInput, TCode >::Config::power_of_two_bound = false |
Uniform ABS/NOA/PREL modes: round the resolved absolute half-bound downward to the nearest power of two. This is between 1x and 2x tighter than requested and makes scaling an exact binary exponent shift. Inspired by SLEEK (IPDPS 2026), Sec. III-A. REL is unsupported because it quantizes in log space.
| bool fz::QuantizerStage< TInput, TCode >::Config::dither = false |
ABS/NOA/REL: reconstruct to a deterministic pseudo-random point within the bin/error-bound interval instead of always the bin center (LC's QUANT_*_R vs. QUANT_*_0). Decorrelates reconstruction error from the signal at no extra storage cost — the offset is a pure function of (element index, dither_seed), reproduced identically on decode. Any element whose dithered reconstruction would violate the error bound is escalated to a lossless outlier instead (same mechanism used for out-of-radius values). Mutually exclusive with linear_mode and inplace_outliers (both lack a per-element outlier-escalation path).
| uint64_t fz::QuantizerStage< TInput, TCode >::Config::dither_seed = 0 |
Seed for the deterministic dither offset. Persisted in the serialized header so decode reproduces identical offsets with no extra storage.
| float fz::QuantizerStage< TInput, TCode >::Config::dither_strength = 1.0f |
Dither offset amplitude as a fraction of abs_eb (or, in REL mode, of half a log-bin width), in (0, 1]. 1.0 (default) matches LC's literal "_R" definition — offset spans the full bin — and empirically escalates ~25% of elements to lossless outliers for smooth data. Lower values trade decorrelation strength for fewer outliers; 0.0 disables the offset entirely (bit-identical to dither=false).