Skip to content

Commit 5477041

Browse files
authored
ggml : fix MIN / MAX macros (#6904)
ggml-ci
1 parent aa750c1 commit 5477041

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ggml-impl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
#include <string.h> // memcpy
1212
#include <math.h> // fabsf
1313

14+
#undef MIN
15+
#undef MAX
16+
17+
#define MIN(a, b) ((a) < (b) ? (a) : (b))
18+
#define MAX(a, b) ((a) > (b) ? (a) : (b))
19+
1420
#ifdef __cplusplus
1521
extern "C" {
1622
#endif

ggml-quants.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
#include <stdlib.h> // for qsort
1515
#include <stdio.h> // for GGML_ASSERT
1616

17-
#undef MIN
18-
#undef MAX
19-
20-
#define MIN(a, b) ((a) < (b) ? (a) : (b))
21-
#define MAX(a, b) ((a) > (b) ? (a) : (b))
22-
2317
#define UNUSED GGML_UNUSED
2418

2519
// some compilers don't provide _mm256_set_m128i, e.g. gcc 7

0 commit comments

Comments
 (0)