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

CDF 9/7 biorthogonal wavelet transform stage (SPERR's DWT front-half). More...

#include "stage/stage.h"
#include "fzm_format.h"
#include "backend/types.h"
#include <array>
#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

struct  fz::Cdf97Config
 
class  fz::Cdf97Stage< TInput >
 

Namespaces

namespace  fz
 

Detailed Description

CDF 9/7 biorthogonal wavelet transform stage (SPERR's DWT front-half).

A dimension-aware, size-preserving, lossless, invertible floating-point basis change: it replaces a field with its multi-level CDF 9/7 wavelet coefficients (same element type, same element count). It is the decorrelating transform of the SPERR compressor (CDF 9/7 DWT -> SPECK); this stage is the DWT only.

Note
Prior work. The transform, its lifting constants, the symmetric boundary handling, the dyadic level count, and the 3-D dyadic vs wavelet-packet selection are ported from NCAR/SPERR (https://github.com/NCAR/SPERR). The double path is validated bit-exact against sperr::CDF97. See THIRD_PARTY.md and the kernel headers (cdf97_lifting.cuh, cdf97_kernels.cuh).

Precision

TInput = double reproduces SPERR's coefficients bit-for-bit (SPERR does the whole transform in double). TInput = float is a faster, deliberately NOT bit-exact variant (constants derived in double, arithmetic in float).

Ports & shape

One input, one output, identical type and size. Dimensionality (1/2/3-D) comes from setDims() — the pipeline pushes its dims into every stage at add-time — and is serialized into the FZM header so the inverse can reconstruct it.

Current limitation

Each transform line is processed in shared memory, so the largest dimension must satisfy maxdim * sizeof(TInput) <= 48 KiB (6144 doubles / 12288 floats). A larger extent throws; the long-line fallback is future work.