FZGPUModules 2.0
GPU-accelerated modular compression pipelines
Loading...
Searching...
No Matches
lorenzo_quant.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "stage/stage.h"
8#include "fzm_format.h"
9#include "backend/types.h"
10#include "log.h"
11#include <array>
12#include <cstdint>
13#include <memory>
14#include <cmath>
15#include <cstring>
16
17namespace fz {
18
19
40enum class ErrorBoundMode : uint8_t {
41 ABS = 0,
42 REL = 1,
43 NOA = 2,
44 PREL = 3,
45};
46
61inline ErrorBoundMode resolveApproxRelMode(ErrorBoundMode mode, const char* stage_name) {
62 if (mode != ErrorBoundMode::REL) return mode;
64 "%s: ErrorBoundMode::REL is deprecated for this stage and has been "
65 "mapped to PREL (abs_eb = eb * max(|data|)). This does NOT guarantee a "
66 "per-element relative bound. Use PREL explicitly to silence this, or "
67 "QuantizerStage with REL for an exact point-wise bound.",
68 stage_name);
70}
71
81 uint32_t quant_radius;
82 uint32_t num_elements;
83 uint32_t outlier_count;
86 uint8_t ndim;
87 uint8_t eb_mode;
88 uint32_t dim_x;
89 uint32_t dim_y;
90 uint32_t dim_z;
91 float user_eb;
92 float value_base;
93 uint8_t zigzag_codes;
94 uint8_t centering;
95 uint8_t reserved[2];
104
105 // Total: 60 bytes (fits easily in 128B stage_config)
106
109 input_type(DataType::FLOAT32), code_type(DataType::UINT16),
110 ndim(1), eb_mode(0), dim_x(0), dim_y(1), dim_z(1),
111 user_eb(0.0f), value_base(0.0f), zigzag_codes(0), centering(0),
112 reserved{0, 0}, error_bound_f64(0.0), value_base_f64(0.0) {}
113};
114static_assert(sizeof(LorenzoQuantConfig) <= FZM_STAGE_CONFIG_SIZE, "LorenzoQuantConfig must fit in FZM_STAGE_CONFIG_SIZE");
115
141template<typename TInput = float, typename TCode = uint16_t>
142class LorenzoQuantStage : public Stage {
143public:
145 struct Config {
146 float error_bound = 1e-3;
147 int quant_radius = 32768;
148 float outlier_capacity = 0.2f;
152 std::array<size_t, 3> dims = {0, 1, 1};
162 bool zigzag_codes = false;
171 bool centering = false;
172 Config() = default;
173 Config(TInput eb, TCode radius = 32768, float outlier_cap = 0.2f,
174 std::array<size_t, 3> d = {0, 1, 1})
175 : error_bound(eb), quant_radius(radius), outlier_capacity(outlier_cap),
176 dims(d) {}
177 };
178
179 explicit LorenzoQuantStage(const Config& config = Config());
180 ~LorenzoQuantStage() override;
181
183 fz::stream_t stream,
184 MemoryPool* pool,
185 const std::vector<void*>& inputs,
186 const std::vector<void*>& outputs,
187 const std::vector<size_t>& sizes
188 ) override;
189
195 void postStreamSync(fz::stream_t stream) override;
196
201 void onFinalize(size_t estimated_inlen, MemoryPool* pool) override;
202
203 size_t estimateDeviceFootprintBytes(size_t /*estimated_inlen*/) const override {
204 return sizeof(uint32_t);
205 }
206
207 std::string getName() const override { return "LorenzoQuant"; }
208 size_t getNumInputs() const override {
209 return is_inverse_ ? (config_.centering ? 4 : 3) : 1;
210 }
211 size_t getNumOutputs() const override {
212 return is_inverse_ ? 1 : (config_.centering ? 4 : 3);
213 }
214
215 std::vector<std::string> getOutputNames() const override {
216 if (config_.centering)
217 return {"codes", "outlier_errors", "outlier_indices", "means"};
218 return {"codes", "outlier_errors", "outlier_indices"};
219 }
220
221 std::vector<size_t> estimateOutputSizes(
222 const std::vector<size_t>& input_sizes
223 ) const override;
224
225 std::unordered_map<std::string, size_t> getActualOutputSizesByName() const override {
226 auto names = getOutputNames();
227 std::unordered_map<std::string, size_t> result;
228 for (size_t i = 0; i < names.size() && i < actual_output_sizes_.size(); i++) {
229 result[names[i]] = actual_output_sizes_[i];
230 }
231 return result;
232 }
233 size_t getActualOutputSize(int index) const override {
234 return (index >= 0 && index < static_cast<int>(actual_output_sizes_.size()))
235 ? actual_output_sizes_[index] : 0;
236 }
237
238 // Preserve the forward-mode actual_output_sizes_ across decompression passes.
239 // decompressMulti() calls saveState()/restoreState() around each inverse
240 // execute() to prevent the inverse pass from permanently corrupting the
241 // 4-element forward output-size vector (inverse sets it to a 1-element vector).
242 void saveState() override { saved_output_sizes_ = actual_output_sizes_; }
243 void restoreState() override { actual_output_sizes_ = saved_output_sizes_; }
244
245 // Configuration accessors
246 void setErrorBound(TInput error_bound) { config_.error_bound = error_bound; }
247 void setQuantRadius(TCode radius) { config_.quant_radius = radius; }
248 void setOutlierCapacity(float capacity) { config_.outlier_capacity = capacity; }
249 void setDims(const std::array<size_t, 3>& dims) override { config_.dims = dims; }
255 config_.eb_mode = resolveApproxRelMode(mode, "LorenzoQuantStage");
256 }
257 // Provide a pre-computed value_range (NOA) or max(|data|) (PREL) to skip
258 // the internal data scan during execute(). Pass 0 to re-enable auto-scan.
259 void setValueBase(float value_base) { config_.precomputed_value_base = value_base; }
260 void setZigzagCodes(bool enable) { config_.zigzag_codes = enable; }
265 void setCentering(bool enable) { config_.centering = enable; }
266 void setDims(size_t x, size_t y = 1, size_t z = 1) { config_.dims = {x, y, z}; }
267
268 TInput getErrorBound() const { return config_.error_bound; }
269 TCode getQuantRadius() const { return config_.quant_radius; }
270 float getOutlierCapacity() const { return config_.outlier_capacity; }
271 std::array<size_t, 3> getDims() const { return config_.dims; }
272 ErrorBoundMode getErrorBoundMode() const { return config_.eb_mode; }
277 TInput getComputedAbsErrorBound() const { return computed_abs_eb_; }
278 float getValueBase() const { return config_.precomputed_value_base; }
279 bool getZigzagCodes() const { return config_.zigzag_codes; }
280 bool getCentering() const { return config_.centering; }
281
283 int ndim() const {
284 if (config_.dims[2] > 1) return 3;
285 if (config_.dims[1] > 1) return 2;
286 return 1;
287 }
288
289 void setInverse(bool inverse) { is_inverse_ = inverse; }
290 bool isInverse() const { return is_inverse_; }
291
292 // ── Serialization ─────────────────────────────────────────────────────────
293
294 uint16_t getStageTypeId() const override {
295 return static_cast<uint16_t>(StageType::LORENZO_QUANT);
296 }
297
298 uint8_t getOutputDataType(size_t output_index) const override {
299 switch (output_index) {
300 case 0: return static_cast<uint8_t>(getCodeDataType()); // codes
301 case 1: return static_cast<uint8_t>(getInputDataType()); // outlier_errors
302 case 2: return static_cast<uint8_t>(DataType::UINT32); // outlier_indices
303 default: return static_cast<uint8_t>(DataType::UINT8);
304 }
305 }
306
307 uint8_t getInputDataType(size_t /*input_index*/) const override {
308 return static_cast<uint8_t>(getInputDataType());
309 }
310
311 size_t serializeHeader(size_t output_index, uint8_t* header_buffer, size_t max_size) const override {
312 (void)output_index; // Lorenzo uses same header for all outputs
313
314 if (max_size < sizeof(LorenzoQuantConfig)) {
315 throw std::runtime_error("Insufficient buffer for Lorenzo config");
316 }
317
318 LorenzoQuantConfig config;
319 config.error_bound = static_cast<float>(computed_abs_eb_); // abs bound used by decompressor
320 config.quant_radius = static_cast<uint32_t>(config_.quant_radius);
321 config.num_elements = static_cast<uint32_t>(num_elements_);
322 config.outlier_count = actual_outlier_count_;
323 config.input_type = getInputDataType();
324 config.code_type = getCodeDataType();
325 config.ndim = static_cast<uint8_t>(ndim());
326 config.eb_mode = static_cast<uint8_t>(config_.eb_mode);
327 config.dim_x = static_cast<uint32_t>(config_.dims[0]);
328 config.dim_y = static_cast<uint32_t>(config_.dims[1]);
329 config.dim_z = static_cast<uint32_t>(config_.dims[2]);
330 config.user_eb = static_cast<float>(config_.error_bound); // original user-specified value
331 config.value_base = static_cast<float>(computed_value_base_);
332 config.error_bound_f64 = static_cast<double>(computed_abs_eb_);
333 config.value_base_f64 = static_cast<double>(computed_value_base_);
334 config.zigzag_codes = config_.zigzag_codes ? uint8_t{1} : uint8_t{0};
335 config.centering = config_.centering ? uint8_t{1} : uint8_t{0};
336 config.reserved[0] = 0; config.reserved[1] = 0; config.reserved[2] = 0;
337
338 std::memcpy(header_buffer, &config, sizeof(LorenzoQuantConfig));
339 return sizeof(LorenzoQuantConfig);
340 }
341
342 size_t getMaxHeaderSize(size_t output_index) const override {
343 (void)output_index;
344 return sizeof(LorenzoQuantConfig);
345 }
346
347 void deserializeHeader(const uint8_t* header_buffer, size_t size) override {
348 // Minimum size is the original 32-byte layout (before user_eb/value_base were added).
349 constexpr size_t kLegacySize = 32;
350 if (size < kLegacySize) {
351 throw std::runtime_error("Invalid Lorenzo config size");
352 }
353
354 LorenzoQuantConfig config;
355 std::memcpy(&config, header_buffer, std::min(size, sizeof(LorenzoQuantConfig)));
356
357 // error_bound in the header is always the absolute bound used at compression.
358 // Prefer the full-precision copy; pre-2026-08-08 headers leave it 0.
359 constexpr size_t kSizeBeforeF64 = 44;
360 const bool has_f64 = (size > kSizeBeforeF64 && config.error_bound_f64 != 0.0);
361 config_.error_bound = config.error_bound;
362 computed_abs_eb_ = has_f64 ? static_cast<TInput>(config.error_bound_f64)
363 : static_cast<TInput>(config.error_bound);
364 config_.quant_radius = static_cast<TCode>(config.quant_radius);
365 num_elements_ = config.num_elements;
366 actual_outlier_count_= config.outlier_count;
367 // New fields: present only in headers written by v1+ (≥40B, added user_eb/value_base/eb_mode).
368 constexpr size_t kV1Size = 40;
369 if (size >= kV1Size) {
370 // Files written before the PREL split stored eb_mode==REL for what
371 // was always the approximate mode. Map it silently (no warning —
372 // decode uses the stored absolute error_bound regardless of mode).
373 auto stored = static_cast<ErrorBoundMode>(config.eb_mode);
374 config_.eb_mode = (stored == ErrorBoundMode::REL)
375 ? ErrorBoundMode::PREL : stored;
376 config_.precomputed_value_base = config.value_base;
377 computed_value_base_ = has_f64
378 ? static_cast<TInput>(config.value_base_f64)
379 : static_cast<TInput>(config.value_base);
380 } else {
382 config_.precomputed_value_base = 0.0f;
383 computed_value_base_ = static_cast<TInput>(0);
384 }
385 // zigzag_codes field added in v2 (≥44B). Compared against the literal v2
386 // size, not sizeof(LorenzoQuantConfig) — the struct has grown since (the
387 // f64 bound fields), and keying off sizeof would stop reading these
388 // fields from every v2 archive.
389 constexpr size_t kV2Size = 44;
390 if (size >= kV2Size) {
391 config_.zigzag_codes = (config.zigzag_codes != 0);
392 // `centering` reuses a byte older writers zeroed as `reserved`, so
393 // pre-centering archives decode as centering-off.
394 config_.centering = (config.centering != 0);
395 } else {
396 config_.zigzag_codes = false;
397 config_.centering = false;
398 }
399
400 // Restore spatial dimensions; handle old (pre-dims) files gracefully
401 int eff_ndim = (config.ndim == 0) ? 1 : static_cast<int>(config.ndim);
402 // dim_x: stored explicitly; fall back to derivation for old files
403 if (config.dim_x > 0) {
404 config_.dims[0] = config.dim_x;
405 } else if (config.num_elements > 0) {
406 size_t yz = std::max<size_t>(1, config.dim_y) * std::max<size_t>(1, config.dim_z);
407 config_.dims[0] = config.num_elements / yz;
408 } else {
409 config_.dims[0] = 0;
410 }
411 if (eff_ndim >= 2) {
412 config_.dims[1] = (config.dim_y > 0) ? config.dim_y : 1;
413 } else {
414 config_.dims[1] = 1;
415 }
416 if (eff_ndim >= 3) {
417 config_.dims[2] = (config.dim_z > 0) ? config.dim_z : 1;
418 } else {
419 config_.dims[2] = 1;
420 }
421 }
422
423private:
424 Config config_;
425 std::vector<size_t> actual_output_sizes_;
426 std::vector<size_t> saved_output_sizes_; // saved by saveState(), restored by restoreState()
427 size_t num_elements_ = 0; // Track for header
428 uint32_t actual_outlier_count_ = 0; // Track for header
429 bool is_inverse_ = false; // false = compress, true = decompress
433 TInput computed_abs_eb_ = 0;
436 TInput computed_value_base_ = static_cast<TInput>(0);
443 uint32_t* d_outlier_count_scratch_ = nullptr;
446 MemoryPool* persistent_pool_ = nullptr;
451 std::weak_ptr<const void> persistent_pool_alive_;
452
453
456 void initOutlierCountScratch(MemoryPool* pool);
457
458 DataType getInputDataType() const {
459 if (std::is_same<TInput, float>::value) return DataType::FLOAT32;
460 if (std::is_same<TInput, double>::value) return DataType::FLOAT64;
461 return DataType::FLOAT32;
462 }
463
464 DataType getCodeDataType() const {
465 if (std::is_same<TCode, uint8_t>::value) return DataType::UINT8;
466 if (std::is_same<TCode, uint16_t>::value) return DataType::UINT16;
467 if (std::is_same<TCode, uint32_t>::value) return DataType::UINT32;
468 return DataType::UINT16;
469 }
470
471 size_t getMaxOutlierCount(size_t num_elements) const {
472 return static_cast<size_t>(std::ceil(num_elements * config_.outlier_capacity));
473 }
474};
475
476extern template class LorenzoQuantStage<float, uint16_t>;
477extern template class LorenzoQuantStage<float, uint8_t>;
478extern template class LorenzoQuantStage<double, uint16_t>;
479extern template class LorenzoQuantStage<double, uint32_t>;
480
481// Kernel launcher declarations — defined in lorenzo.cu.
482
483template<typename TInput, typename TCode>
485 const TInput* d_input, size_t n,
486 TInput ebx2_r, TCode quant_radius,
487 TCode* d_codes, TInput* d_outlier_errors,
488 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
489 size_t max_outliers, int grid_size,
490 bool zigzag_codes,
491 fz::stream_t stream,
494 TInput* d_means = nullptr
495);
496
497template<typename TInput, typename TCode>
499 const TCode* d_codes,
500 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
501 uint32_t outlier_n,
502 size_t n,
503 TInput ebx2, TCode quant_radius,
504 TInput* d_output,
505 bool zigzag_codes,
506 fz::stream_t stream, MemoryPool* pool,
508 const TInput* d_means = nullptr
509);
510
512template<typename TInput, typename TCode>
514 const TInput* d_input, size_t nx, size_t ny,
515 TInput ebx2_r, TCode quant_radius,
516 TCode* d_codes, TInput* d_outlier_errors,
517 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
518 size_t max_outliers,
519 bool zigzag_codes,
520 fz::stream_t stream
521);
522
524template<typename TInput, typename TCode>
526 const TCode* d_codes,
527 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
528 uint32_t outlier_n,
529 size_t nx, size_t ny,
530 TInput ebx2, TCode quant_radius,
531 TInput* d_output,
532 bool zigzag_codes,
533 fz::stream_t stream, MemoryPool* pool
534);
535
537template<typename TInput, typename TCode>
539 const TInput* d_input, size_t nx, size_t ny, size_t nz,
540 TInput ebx2_r, TCode quant_radius,
541 TCode* d_codes, TInput* d_outlier_errors,
542 uint32_t* d_outlier_indices, uint32_t* d_outlier_count,
543 size_t max_outliers,
544 bool zigzag_codes,
545 fz::stream_t stream
546);
547
549template<typename TInput, typename TCode>
551 const TCode* d_codes,
552 const TInput* d_outlier_errors, const uint32_t* d_outlier_indices,
553 uint32_t outlier_n,
554 size_t nx, size_t ny, size_t nz,
555 TInput ebx2, TCode quant_radius,
556 TInput* d_output,
557 bool zigzag_codes,
558 fz::stream_t stream, MemoryPool* pool
559);
560
561} // namespace fz
Definition lorenzo_quant.h:142
std::unordered_map< std::string, size_t > getActualOutputSizesByName() const override
Definition lorenzo_quant.h:225
int ndim() const
Returns the effective spatial dimensionality (1, 2, or 3).
Definition lorenzo_quant.h:283
void postStreamSync(fz::stream_t stream) override
uint8_t getOutputDataType(size_t output_index) const override
Definition lorenzo_quant.h:298
uint16_t getStageTypeId() const override
Definition lorenzo_quant.h:294
void setCentering(bool enable)
Definition lorenzo_quant.h:265
void setErrorBoundMode(ErrorBoundMode mode)
Definition lorenzo_quant.h:254
size_t getActualOutputSize(int index) const override
Definition lorenzo_quant.h:233
void saveState() override
Definition lorenzo_quant.h:242
size_t serializeHeader(size_t output_index, uint8_t *header_buffer, size_t max_size) const override
Definition lorenzo_quant.h:311
void execute(fz::stream_t stream, MemoryPool *pool, const std::vector< void * > &inputs, const std::vector< void * > &outputs, const std::vector< size_t > &sizes) override
size_t getMaxHeaderSize(size_t output_index) const override
Definition lorenzo_quant.h:342
size_t estimateDeviceFootprintBytes(size_t) const override
Definition lorenzo_quant.h:203
std::string getName() const override
Definition lorenzo_quant.h:207
uint8_t getInputDataType(size_t) const override
Definition lorenzo_quant.h:307
void deserializeHeader(const uint8_t *header_buffer, size_t size) override
Definition lorenzo_quant.h:347
std::vector< std::string > getOutputNames() const override
Definition lorenzo_quant.h:215
void onFinalize(size_t estimated_inlen, MemoryPool *pool) override
void setDims(const std::array< size_t, 3 > &dims) override
Definition lorenzo_quant.h:249
void setInverse(bool inverse)
Definition lorenzo_quant.h:289
std::vector< size_t > estimateOutputSizes(const std::vector< size_t > &input_sizes) const override
TInput getComputedAbsErrorBound() const
Definition lorenzo_quant.h:277
Definition mempool.h:82
Definition stage.h:30
FZM binary file format definitions — structs, enums, and helpers.
Logging infrastructure and macros.
#define FZ_LOG(level,...)
Definition log.h:201
Definition algorithms.h:48
void launchLorenzoInverseKernel(const TCode *d_codes, const TInput *d_outlier_errors, const uint32_t *d_outlier_indices, uint32_t outlier_n, size_t n, TInput ebx2, TCode quant_radius, TInput *d_output, bool zigzag_codes, fz::stream_t stream, MemoryPool *pool, const TInput *d_means=nullptr)
void launchLorenzoKernel3D(const TInput *d_input, size_t nx, size_t ny, size_t nz, TInput ebx2_r, TCode quant_radius, TCode *d_codes, TInput *d_outlier_errors, uint32_t *d_outlier_indices, uint32_t *d_outlier_count, size_t max_outliers, bool zigzag_codes, fz::stream_t stream)
3-D forward Lorenzo kernel launcher.
ErrorBoundMode
Definition lorenzo_quant.h:40
@ PREL
Pseudo-relative: eb × max(|data|), applied as a single ABS bound.
@ NOA
Value-range relative bound (norm-of-absolute).
@ ABS
Absolute error bound.
@ REL
Exact per-element point-wise relative bound (QuantizerStage only).
ErrorBoundMode resolveApproxRelMode(ErrorBoundMode mode, const char *stage_name)
Definition lorenzo_quant.h:61
void launchLorenzoKernel2D(const TInput *d_input, size_t nx, size_t ny, TInput ebx2_r, TCode quant_radius, TCode *d_codes, TInput *d_outlier_errors, uint32_t *d_outlier_indices, uint32_t *d_outlier_count, size_t max_outliers, bool zigzag_codes, fz::stream_t stream)
2-D forward Lorenzo kernel launcher. nx is the fast (x) dimension.
constexpr size_t FZM_STAGE_CONFIG_SIZE
Per-stage serialized config slot (bytes)
Definition fzm_format.h:65
void launchLorenzoKernel(const TInput *d_input, size_t n, TInput ebx2_r, TCode quant_radius, TCode *d_codes, TInput *d_outlier_errors, uint32_t *d_outlier_indices, uint32_t *d_outlier_count, size_t max_outliers, int grid_size, bool zigzag_codes, fz::stream_t stream, TInput *d_means=nullptr)
DataType
Element data type identifiers used in buffer and stage descriptors.
Definition fzm_format.h:117
void launchLorenzoInverseKernel3D(const TCode *d_codes, const TInput *d_outlier_errors, const uint32_t *d_outlier_indices, uint32_t outlier_n, size_t nx, size_t ny, size_t nz, TInput ebx2, TCode quant_radius, TInput *d_output, bool zigzag_codes, fz::stream_t stream, MemoryPool *pool)
3-D inverse Lorenzo kernel launcher.
@ WARN
Unexpected but recoverable: outlier overflow, fallbacks.
void launchLorenzoInverseKernel2D(const TCode *d_codes, const TInput *d_outlier_errors, const uint32_t *d_outlier_indices, uint32_t outlier_n, size_t nx, size_t ny, TInput ebx2, TCode quant_radius, TInput *d_output, bool zigzag_codes, fz::stream_t stream, MemoryPool *pool)
2-D inverse Lorenzo kernel launcher.
Base class interface for all compression stages.
Definition lorenzo_quant.h:79
uint8_t zigzag_codes
1 if codes are zigzag-encoded, else 0.
Definition lorenzo_quant.h:93
float value_base
value_range (NOA) or max(|data|) (REL) used in conversion.
Definition lorenzo_quant.h:92
uint8_t centering
1 if per-tile mean centering is enabled, else 0.
Definition lorenzo_quant.h:94
DataType input_type
Original input type (1B).
Definition lorenzo_quant.h:84
uint32_t quant_radius
Quantization radius.
Definition lorenzo_quant.h:81
float error_bound
Absolute bound after mode conversion (used by decompressor).
Definition lorenzo_quant.h:80
uint8_t eb_mode
ErrorBoundMode cast to uint8_t.
Definition lorenzo_quant.h:87
uint32_t num_elements
Total element count.
Definition lorenzo_quant.h:82
uint8_t ndim
Spatial dimensionality 1/2/3 (0 treated as 1).
Definition lorenzo_quant.h:86
double value_base_f64
Full-precision value_base; 0 in pre-2026-08-08 headers.
Definition lorenzo_quant.h:103
double error_bound_f64
Definition lorenzo_quant.h:102
uint32_t dim_z
Z dimension (1 for 1-D/2-D).
Definition lorenzo_quant.h:90
uint8_t reserved[2]
Definition lorenzo_quant.h:95
DataType code_type
Quantization code type (1B).
Definition lorenzo_quant.h:85
uint32_t dim_y
Y dimension (1 for 1-D).
Definition lorenzo_quant.h:89
uint32_t outlier_count
Actual number of outliers.
Definition lorenzo_quant.h:83
float user_eb
Original user-specified error bound value.
Definition lorenzo_quant.h:91
uint32_t dim_x
X (fast) dimension; 0 = infer from num_elements.
Definition lorenzo_quant.h:88
Definition lorenzo_quant.h:145
int quant_radius
Quantization radius (2^15 for uint16_t).
Definition lorenzo_quant.h:147
ErrorBoundMode eb_mode
Definition lorenzo_quant.h:156
float error_bound
Error bound (interpretation depends on eb_mode).
Definition lorenzo_quant.h:146
bool zigzag_codes
Definition lorenzo_quant.h:162
float outlier_capacity
Definition lorenzo_quant.h:148
float precomputed_value_base
Definition lorenzo_quant.h:159
bool centering
Definition lorenzo_quant.h:171
std::array< size_t, 3 > dims
Definition lorenzo_quant.h:152
Backend-neutral GPU type aliases.