From 8da87d02ca6fd578ee556c3b6a4b7aac49bac025 Mon Sep 17 00:00:00 2001 From: x Date: Mon, 13 Mar 2023 10:40:36 +0100 Subject: [PATCH] TurboPFor: Variable byte c/c++ header --- include_/vint.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include_/vint.h b/include_/vint.h index 3a8f4cc..49f7a06 100644 --- a/include_/vint.h +++ b/include_/vint.h @@ -1,4 +1,8 @@ //-- "Integer Compression" variable byte (scalar TurboVByte+ SIMD TurboByte) --------------------------------------------------------------- +#define V8PAYLOAD(_n_, _usize_) (((_n_)*(_usize_/16)+7)/8) +#define V8BOUND_(_n_, _usize_) (V8PAYLOAD(_n_, _usize_)+ (_n_)*(_usize_/8)) +#define V8BOUND16(_n_) V8BOUND_(_n_, 16) +#define V8BOUND32(_n_) V8BOUND_(_n_, 32) #ifdef __cplusplus extern "C" {