]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml : fix MIN / MAX macro re-definition
authorGeorgi Gerganov <redacted>
Tue, 7 Nov 2023 14:08:46 +0000 (16:08 +0200)
committerGeorgi Gerganov <redacted>
Tue, 7 Nov 2023 14:08:46 +0000 (16:08 +0200)
ggml.c

diff --git a/ggml.c b/ggml.c
index 018f0ce0bba8ece9504c926820c299d0b3e00055..d1b7e94ddc2ebbe1480fd5b7bacf6cab1f91b4f2 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -143,12 +143,6 @@ void ggml_print_backtrace(void) {
 }
 #endif
 
-#undef MIN
-#undef MAX
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
 /*#define GGML_PERF*/
 #define GGML_DEBUG 0
 #define GGML_GELU_FP16
@@ -277,6 +271,12 @@ inline static void * ggml_aligned_malloc(size_t size) {
 // floating point type used to accumulate sums
 typedef double ggml_float;
 
+#undef MIN
+#undef MAX
+
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
 //
 // global data
 //