]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml : fix MIN / MAX macros (llama/6904)
authorGeorgi Gerganov <redacted>
Thu, 25 Apr 2024 12:12:28 +0000 (15:12 +0300)
committerGeorgi Gerganov <redacted>
Mon, 13 May 2024 08:02:26 +0000 (11:02 +0300)
ggml-ci

ggml-impl.h
ggml-quants.c

index ae27d9789998f1393b522c7df4eb82dee8ac6e22..3cb0a599783e599f8b720b26811433ad3e729707 100644 (file)
 #include <string.h> // memcpy
 #include <math.h>   // 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
index e4f96e399d49a9dbe54f9c9f534394f631077587..7d54730eecb5774ce563e0e9e7aa41f520741b3d 100644 (file)
 #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