aboutsummaryrefslogtreecommitdiffstats
path: root/cheesemap.h
diff options
context:
space:
mode:
Diffstat (limited to 'cheesemap.h')
-rw-r--r--cheesemap.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cheesemap.h b/cheesemap.h
index 5d87a6c..d17a8f5 100644
--- a/cheesemap.h
+++ b/cheesemap.h
@@ -13,7 +13,16 @@ extern "C" {
#include <stdbool.h>
#include <stdint.h>
-#ifdef CM_SSE2
+_Noreturn void CM_OPT_PANIC_NAME(const char* file, uint32_t line,
+ const char* fmt, ...);
+
+#define cm_assert(cond) \
+ do { \
+ if (!(cond)) \
+ CM_OPT_PANIC_NAME(__FILE__, __LINE__, "cm_assertion failed: %s", #cond); \
+ } while (0)
+
+#ifdef CM_OPT_ENABLE_SSE2
#include <emmintrin.h>
typedef __m128i group_t;