FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
fz::LorenzoQuantStage< TInput, TCode >::Config Struct Reference

#include <lorenzo_quant.h>

Public Attributes

float error_bound = 1e-3
 Error bound (interpretation depends on eb_mode).
 
int quant_radius = 32768
 Quantization radius (2^15 for uint16_t).
 
float outlier_capacity = 0.2f
 
std::array< size_t, 3 > dims = {0, 1, 1}
 
ErrorBoundMode eb_mode = ErrorBoundMode::ABS
 
float precomputed_value_base = 0.0f
 
bool zigzag_codes = false
 
bool centering = false
 

Detailed Description

template<typename TInput = float, typename TCode = uint16_t>
struct fz::LorenzoQuantStage< TInput, TCode >::Config

Construction parameters.

Member Data Documentation

◆ outlier_capacity

template<typename TInput = float, typename TCode = uint16_t>
float fz::LorenzoQuantStage< TInput, TCode >::Config::outlier_capacity = 0.2f

Fraction of input size reserved for outliers.

◆ dims

template<typename TInput = float, typename TCode = uint16_t>
std::array<size_t, 3> fz::LorenzoQuantStage< TInput, TCode >::Config::dims = {0, 1, 1}

Spatial dimensions {x, y, z} where x is fastest. dims[0]==0 → infer x from num_elements at runtime (valid for 1-D). dims[1]==dims[2]==1 → 1-D; dims[2]==1 → 2-D; otherwise 3-D.

◆ eb_mode

template<typename TInput = float, typename TCode = uint16_t>
ErrorBoundMode fz::LorenzoQuantStage< TInput, TCode >::Config::eb_mode = ErrorBoundMode::ABS

ABS, NOA, or PREL. REL is accepted as a deprecated alias for PREL (resolved with a warning at execute time) — this stage cannot honour an exact per-element relative bound.

◆ precomputed_value_base

template<typename TInput = float, typename TCode = uint16_t>
float fz::LorenzoQuantStage< TInput, TCode >::Config::precomputed_value_base = 0.0f

Pre-computed value_range (NOA) or max(|data|) (PREL) to skip the device scan in execute(). Leave at 0 to auto-compute.

◆ zigzag_codes

template<typename TInput = float, typename TCode = uint16_t>
bool fz::LorenzoQuantStage< TInput, TCode >::Config::zigzag_codes = false

Zigzag-encode codes before storage to improve compressibility when codes cluster near zero (−2→3, −1→1, 0→0, 1→2, …).

◆ centering

template<typename TInput = float, typename TCode = uint16_t>
bool fz::LorenzoQuantStage< TInput, TCode >::Config::centering = false

Per-tile mean centering (FSZ adaptive centering): predict each 1024-element tile's first element from the tile mean mu instead of from 0, so its residual is q_0 - mu rather than the raw q_0. Since delta(q - mu) == delta(q), no other residual changes. Pays off on fields with a large constant offset (temperature in Kelvin, pressure in hPa) where that raw seed dominates the tile. 1-D only — the 2-D/3-D paths have no per-tile chain to seed and execute() rejects the combination. Adds a "means" port.