Spaces:
Sleeping
Sleeping
ggml : fix MIN / MAX macros (llama/6904)
Browse files- ggml-impl.h +6 -0
- ggml-quants.c +0 -6
ggml-impl.h
CHANGED
|
@@ -11,6 +11,12 @@
|
|
| 11 |
#include <string.h> // memcpy
|
| 12 |
#include <math.h> // fabsf
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
#ifdef __cplusplus
|
| 15 |
extern "C" {
|
| 16 |
#endif
|
|
|
|
| 11 |
#include <string.h> // memcpy
|
| 12 |
#include <math.h> // fabsf
|
| 13 |
|
| 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 |
+
|
| 20 |
#ifdef __cplusplus
|
| 21 |
extern "C" {
|
| 22 |
#endif
|
ggml-quants.c
CHANGED
|
@@ -20,12 +20,6 @@
|
|
| 20 |
#pragma warning(disable: 4244 4267)
|
| 21 |
#endif
|
| 22 |
|
| 23 |
-
#undef MIN
|
| 24 |
-
#undef MAX
|
| 25 |
-
|
| 26 |
-
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
| 27 |
-
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
| 28 |
-
|
| 29 |
#define UNUSED GGML_UNUSED
|
| 30 |
|
| 31 |
// some compilers don't provide _mm256_set_m128i, e.g. gcc 7
|
|
|
|
| 20 |
#pragma warning(disable: 4244 4267)
|
| 21 |
#endif
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
#define UNUSED GGML_UNUSED
|
| 24 |
|
| 25 |
// some compilers don't provide _mm256_set_m128i, e.g. gcc 7
|