From 056fbe5eb3ad9e92000c8d4e8c903fd4721a1e3f Mon Sep 17 00:00:00 2001 From: Jinqing Kuang Date: Tue, 15 Oct 2024 15:30:04 +0800 Subject: [PATCH] fix(query)[TD-30667]. Fix compilation with AVX instructions on older GCC versions --- include/util/tcompression.h | 2 +- source/util/src/tdecompress.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/util/tcompression.h b/include/util/tcompression.h index d32d20b727..1f09b750cb 100644 --- a/include/util/tcompression.h +++ b/include/util/tcompression.h @@ -156,9 +156,9 @@ int32_t getWordLength(char type); int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type); int32_t tsDecompressFloatImpAvx2(const char *input, int32_t nelements, char *output); int32_t tsDecompressDoubleImpAvx2(const char *input, int32_t nelements, char *output); -void tsDecompressTimestampAvx2(const char *input, int32_t nelements, char *output, bool bigEndian); #endif #ifdef __AVX512VL__ +void tsDecompressTimestampAvx2(const char *input, int32_t nelements, char *output, bool bigEndian); void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, bool bigEndian); #endif diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index 60a1f1c938..81223d7311 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -449,7 +449,9 @@ int32_t tsDecompressDoubleImpAvx2(const char *input, const int32_t nelements, ch } return (int32_t)(out - output); } +#endif +#if __AVX512VL__ // decode two timestamps in one loop. void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian) { int64_t *ostream = (int64_t *)output; @@ -588,9 +590,7 @@ void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, } return; } -#endif -#if __AVX512VL__ void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, bool UNUSED_PARAM(bigEndian)) { int64_t *ostream = (int64_t *)output;