aboutsummaryrefslogtreecommitdiff
path: root/k_quants.h
diff options
context:
space:
mode:
authorEvan Miller <emmiller@gmail.com>2023-07-14 14:55:56 -0400
committerGitHub <noreply@github.com>2023-07-14 21:55:56 +0300
commite8035f141e1f71d739fa5cfc9c01531cdee6fc16 (patch)
tree91c4a0527fb4fb5ad7f03457675c1b2e5c59af73 /k_quants.h
parent7513b7b0a1c11faa00ad5a34d22681e5f07d32e4 (diff)
ggml : fix static_assert with older compilers #2024 (#2218)
Diffstat (limited to 'k_quants.h')
-rw-r--r--k_quants.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/k_quants.h b/k_quants.h
index 6abe3d7..adc6a39 100644
--- a/k_quants.h
+++ b/k_quants.h
@@ -15,6 +15,14 @@
#define K_SCALE_SIZE 12
#endif
+#ifndef static_assert
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201100L)
+#define static_assert(cond, msg) _Static_assert(cond, msg)
+#else
+#define static_assert(cond, msg) struct global_scope_noop_trick
+#endif
+#endif
+
//
// Super-block quantization structures
//