From: Georgi Gerganov Date: Thu, 25 Apr 2024 12:12:28 +0000 (+0300) Subject: ggml : fix MIN / MAX macros (llama/6904) X-Git-Tag: upstream/1.7.4~806 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a15fb5cd798a5e620d6ae184ef178c7cc8c89054;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : fix MIN / MAX macros (llama/6904) ggml-ci --- diff --git a/ggml-impl.h b/ggml-impl.h index ae27d978..3cb0a599 100644 --- a/ggml-impl.h +++ b/ggml-impl.h @@ -11,6 +11,12 @@ #include // memcpy #include // fabsf +#undef MIN +#undef MAX + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + #ifdef __cplusplus extern "C" { #endif diff --git a/ggml-quants.c b/ggml-quants.c index e4f96e39..7d54730e 100644 --- a/ggml-quants.c +++ b/ggml-quants.c @@ -20,12 +20,6 @@ #pragma warning(disable: 4244 4267) #endif -#undef MIN -#undef MAX - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - #define UNUSED GGML_UNUSED // some compilers don't provide _mm256_set_m128i, e.g. gcc 7