From f947eb752ac7c4a16917d3477ed4916872952de3 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sat, 23 Sep 2023 11:58:03 +0800 Subject: [PATCH] fix: define BUILDIN_CLZ_EX --- include/td_sz.h | 2 +- utils/TSZ/sz/inc/transcode.h | 8 ++++---- utils/TSZ/sz/src/transcode.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/td_sz.h b/include/td_sz.h index 3a3e917b1f..927ace38ee 100644 --- a/include/td_sz.h +++ b/include/td_sz.h @@ -27,7 +27,7 @@ double cost_end(const char* tag); // // Init success return 1 else 0 // -void tdszInit(double fPrecision, double dPrecision, unsigned int maxIntervals, unsigned int intervals, int ifAdtFse, const char* compressor); +void tdszInit(float fPrecision, double dPrecision, unsigned int maxIntervals, unsigned int intervals, int ifAdtFse, const char* compressor); // // compress interface to tdengine return value is count of output with bytes diff --git a/utils/TSZ/sz/inc/transcode.h b/utils/TSZ/sz/inc/transcode.h index 27b3aa79b7..056d4943ad 100644 --- a/utils/TSZ/sz/inc/transcode.h +++ b/utils/TSZ/sz/inc/transcode.h @@ -19,9 +19,9 @@ extern "C" { #ifdef WINDOWS -int32_t BUILDIN_CLZ(uint32_t val); +int32_t BUILDIN_CLZ_EX(uint32_t val); #else -#define BUILDIN_CLZ(val) __builtin_clz(val) +#define BUILDIN_CLZ_EX(val) __builtin_clz(val) #endif /** @@ -60,10 +60,10 @@ MEM_STATIC int Int2code(int factor) 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 }; if (factor >= 0) - return (factor > 63) ? 50 - BUILDIN_CLZ(factor) : Ft_Code[factor]; + return (factor > 63) ? 50 - BUILDIN_CLZ_EX(factor) : Ft_Code[factor]; else { factor = -factor; - return (factor > 63) ? 17 + BUILDIN_CLZ(factor) : 67 - Ft_Code[factor]; + return (factor > 63) ? 17 + BUILDIN_CLZ_EX(factor) : 67 - Ft_Code[factor]; } } diff --git a/utils/TSZ/sz/src/transcode.c b/utils/TSZ/sz/src/transcode.c index abd015515f..706a7bfdd3 100644 --- a/utils/TSZ/sz/src/transcode.c +++ b/utils/TSZ/sz/src/transcode.c @@ -15,7 +15,7 @@ #ifdef WINDOWS -int32_t BUILDIN_CLZ(uint32_t val) { +int32_t BUILDIN_CLZ_EX(uint32_t val) { unsigned long r = 0; _BitScanReverse(&r, val); return (int)(31 - r);