]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml : fix MIN / MAX macros (#6904)
authorGeorgi Gerganov <redacted>
Thu, 25 Apr 2024 12:12:28 +0000 (15:12 +0300)
committerGitHub <redacted>
Thu, 25 Apr 2024 12:12:28 +0000 (15:12 +0300)
ggml-ci

ggml-impl.h
ggml-quants.c

index 2ffacc299e4f186f48947bc694cee7820428342b..2087f7ded7b9977a006ed87e20f1d1f62f1ec642 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 11e11c2196c2cf5c700e998109378c032f25d5c6..c147531df1cd50c6e2578da042467685b0013e76 100644 (file)
 #include <stdlib.h> // for qsort
 #include <stdio.h>  // for GGML_ASSERT
 
-#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