reorganize intrinsic includes to make clang happy

This commit is contained in:
Martins Mozeiko
2026-06-22 14:21:01 -07:00
committed by Ryan Fleury
parent 76fa2be5a9
commit 401383bbd8
6 changed files with 160 additions and 155 deletions
-25
View File
@@ -6,31 +6,6 @@
#define BLAKE3_API static
#define BLAKE3_PRIVATE static
#if defined(__clang__) && defined(__x86_64__)
# if defined(__IMMINTRIN_H)
# error "include this header before immintrin.h / x86intrin.h / intrin.h"
# endif
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# pragma push_macro("__AVX__")
# pragma push_macro("__AVX2__")
# pragma push_macro("__SSE4_1__")
# pragma push_macro("__AVX512F__")
# pragma push_macro("__AVX512VL__")
# define __AVX__ 1
# define __AVX2__ 1
# define __SSE4_1__ 1
# define __AVX512F__ 1
# define __AVX512VL__ 1
# include <immintrin.h>
# pragma pop_macro("__AVX512VL__")
# pragma pop_macro("__AVX512F__")
# pragma pop_macro("__SSE4_1__")
# pragma pop_macro("__AVX2__")
# pragma pop_macro("__AVX__")
# pragma clang diagnostic pop
#endif
#include "third_party/blake3/c/blake3.h"
static void