]> git.djapps.eu Git - pkg/ggml/sources/ggml/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>
Sat, 11 May 2024 18:30:08 +0000 (21:30 +0300)
ggml-ci

src/ggml-impl.h
src/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 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