From 77bcf250be66e3ceb8b17263794cfc494d534c22 Mon Sep 17 00:00:00 2001 From: AntoinePrv Date: Mon, 2 Feb 2026 15:43:23 +0100 Subject: [PATCH 1/2] Slighly less pessimistic detection of neon64 --- include/xsimd/config/xsimd_config.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/xsimd/config/xsimd_config.hpp b/include/xsimd/config/xsimd_config.hpp index 58ce53462..3151ab9b1 100644 --- a/include/xsimd/config/xsimd_config.hpp +++ b/include/xsimd/config/xsimd_config.hpp @@ -343,14 +343,12 @@ #endif -#ifdef __ARM_NEON - /** * @ingroup xsimd_config_macro * * Set to 1 if NEON is available at compile-time, to 0 otherwise. */ -#if __ARM_ARCH >= 7 +#if defined(__ARM_NEON) && __ARM_ARCH >= 7 #define XSIMD_WITH_NEON 1 #else #define XSIMD_WITH_NEON 0 @@ -361,15 +359,11 @@ * * Set to 1 if NEON64 is available at compile-time, to 0 otherwise. */ -#ifdef __aarch64__ +#if defined(__aarch64__) || defined(_M_ARM64) #define XSIMD_WITH_NEON64 1 #else #define XSIMD_WITH_NEON64 0 #endif -#else -#define XSIMD_WITH_NEON 0 -#define XSIMD_WITH_NEON64 0 -#endif /** * @ingroup xsimd_config_macro From e151357a283e60704e2aaedeffee2c2456b00c5c Mon Sep 17 00:00:00 2001 From: AntoinePrv Date: Mon, 2 Feb 2026 15:53:55 +0100 Subject: [PATCH 2/2] Force neon from neon64 --- include/xsimd/config/xsimd_config.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/xsimd/config/xsimd_config.hpp b/include/xsimd/config/xsimd_config.hpp index 3151ab9b1..e81dd8053 100644 --- a/include/xsimd/config/xsimd_config.hpp +++ b/include/xsimd/config/xsimd_config.hpp @@ -346,23 +346,23 @@ /** * @ingroup xsimd_config_macro * - * Set to 1 if NEON is available at compile-time, to 0 otherwise. + * Set to 1 if NEON64 is available at compile-time, to 0 otherwise. */ -#if defined(__ARM_NEON) && __ARM_ARCH >= 7 -#define XSIMD_WITH_NEON 1 +#if defined(__aarch64__) || defined(_M_ARM64) +#define XSIMD_WITH_NEON64 1 #else -#define XSIMD_WITH_NEON 0 +#define XSIMD_WITH_NEON64 0 #endif /** * @ingroup xsimd_config_macro * - * Set to 1 if NEON64 is available at compile-time, to 0 otherwise. + * Set to 1 if NEON is available at compile-time, to 0 otherwise. */ -#if defined(__aarch64__) || defined(_M_ARM64) -#define XSIMD_WITH_NEON64 1 +#if (defined(__ARM_NEON) && __ARM_ARCH >= 7) || XSIMD_WITH_NEON64 +#define XSIMD_WITH_NEON 1 #else -#define XSIMD_WITH_NEON64 0 +#define XSIMD_WITH_NEON 0 #endif /**