|
FZGPUModules 2.0
GPU-accelerated modular compression pipelines
|
Header: modules/predictors/lorenzo/lorenzo_stage.h
Class: fz::LorenzoStage<T>
Category: Predictor (lossless)
Plain integer Lorenzo predictor. Lossless, size-preserving.
Supports 1-D, 2-D, and 3-D layouts. Typically placed after a QuantizerStage in cuSZp-style pipelines (float → quant → Lorenzo → bitpack), where it operates on the quantization codes rather than raw floating-point data.
| Parameter | Constraint |
|---|---|
T | Signed integer (see available instantiations below) |
Only these types are compiled and linked:
LorenzoStage<int8_t>LorenzoStage<int16_t>LorenzoStage<int32_t>LorenzoStage<int64_t>Using any other type will result in a linker error. Common choice: LorenzoStage<int32_t> (to match quantizer code width).
| Setting | Purpose | Notes |
|---|---|---|
setDims(x[,y,z]) | Spatial dimensions | Or via Pipeline::setDims(); selects 1-/2-/3-D delta |
setBlockSize(n) | 1-D block-local reset period | 0 = default; n>0 = cuSZp-style, see below |
By default (block_size == 0) the predictor uses the N-D inclusion-exclusion delta selected by dims_ (and the 1-D path already resets per launch block of 256).
setBlockSize(n) with n > 0 forces the 1-D path over the flattened array and restarts the prediction chain (prev = 0) every n elements, independent of the launch configuration and of dims_. This is the cuSZp predictor (it uses n = 32). n must be in [1, 1024] (the inverse scans one segment per CUDA block of n threads). Block mode is graph-compatible. The block_size is serialized in the FZM stage header (legacy 16-byte headers default it to 0).
Single input → single output; element type and size are unchanged.
| Direction | Port | Type |
|---|---|---|
| Input | "output" (default) | T[n] |
| Output | "output" | T[n] |
Connection from a quantizer upstream uses the "codes" port of the quantizer:
Same rule as LorenzoQuantStage: call p.setDims() before addStage(), or call stage->setDims() directly after adding.
The cuSZp front-end pairs the linear quantizer (signed codes, no outliers) with a block-local Lorenzo predictor: