File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 4545typedef __m128i flb_vector8 ;
4646typedef __m128i flb_vector32 ;
4747
48- #elif defined(__aarch64__ ) && defined(__ARM_NEON )
48+ #elif defined(__aarch64__ ) || defined(_M_ARM64 ) || defined( _M_ARM64EC )
4949/*
5050 * We use the Neon instructions if the compiler provides access to them (as
5151 * indicated by __ARM_NEON) and we are on aarch64. While Neon support is
@@ -54,7 +54,16 @@ typedef __m128i flb_vector32;
5454 * could not realistically use it there without a run-time check, which seems
5555 * not worth the trouble for now.
5656 */
57- #include <arm_neon.h>
57+ #ifndef __ARM_NEON
58+ #define __ARM_NEON 1
59+ #endif
60+ #if __has_include (< arm_neon .h > )
61+ #include <arm_neon.h>
62+ #elif __has_include (< arm64_neon .h > )
63+ #include <arm64_neon.h>
64+ #else
65+ #error "NEON intrinsics header not found on this toolchain"
66+ #endif
5867#define FLB_SIMD_NEON
5968typedef uint8x16_t flb_vector8 ;
6069typedef uint32x4_t flb_vector32 ;
You can’t perform that action at this time.
0 commit comments