diff --git a/cmake/checks/cpu_neon.cpp b/cmake/checks/cpu_neon.cpp index bb103ec366..7af16f5ffc 100644 --- a/cmake/checks/cpu_neon.cpp +++ b/cmake/checks/cpu_neon.cpp @@ -5,7 +5,7 @@ # include # include # define CV_NEON 1 -#elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__)) +#elif defined(__ARM_NEON) # include # define CV_NEON 1 #endif diff --git a/modules/core/include/opencv2/core/cv_cpu_dispatch.h b/modules/core/include/opencv2/core/cv_cpu_dispatch.h index 8269fa6121..0817e7ec70 100644 --- a/modules/core/include/opencv2/core/cv_cpu_dispatch.h +++ b/modules/core/include/opencv2/core/cv_cpu_dispatch.h @@ -141,7 +141,7 @@ # include # include # define CV_NEON 1 -#elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__)) +#elif defined(__ARM_NEON) # include # define CV_NEON 1 #endif @@ -151,10 +151,6 @@ # define CV_RVV071 1 #endif -#if defined(__ARM_NEON__) || defined(__aarch64__) -# include -#endif - #ifdef CV_CPU_COMPILE_VSX # include # undef vector @@ -229,7 +225,7 @@ struct VZeroUpperGuard { # include # include # define CV_NEON 1 -#elif defined(__ARM_NEON__) || (defined (__ARM_NEON) && defined(__aarch64__)) +#elif defined(__ARM_NEON) # include # define CV_NEON 1 #elif defined(__VSX__) && defined(__PPC64__) && defined(__LITTLE_ENDIAN__) diff --git a/modules/core/include/opencv2/core/fast_math.hpp b/modules/core/include/opencv2/core/fast_math.hpp index ff9ee46af6..a28c3fbedf 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -84,7 +84,7 @@ #if defined(CV_INLINE_ROUND_FLT) // user-specified version // CV_INLINE_ROUND_DBL should be defined too - #elif defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__ + #elif defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON) && !defined __SOFTFP__ // 1. general scheme #define ARM_ROUND(_value, _asm_string) \ int res; \ diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index b9d3ecaa1a..934c3b458c 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -637,10 +637,10 @@ struct HWFeatures } #endif #elif (defined __APPLE__) - #if (defined __ARM_NEON__ || (defined __ARM_NEON && defined __aarch64__)) + #if defined __ARM_NEON have[CV_CPU_NEON] = true; #endif - #if (defined __ARM_FP && (((__ARM_FP & 0x2) != 0) && defined __ARM_NEON__)) + #if (defined __ARM_FP && (((__ARM_FP & 0x2) != 0) && defined __ARM_NEON)) have[CV_CPU_FP16] = have[CV_CPU_NEON_FP16] = true; #endif // system.cpp may be compiled w/o special -march=armv8...+dotprod, -march=armv8...+bf16 etc., @@ -659,7 +659,7 @@ struct HWFeatures have[CV_CPU_NEON_BF16] = true; } #elif (defined __clang__) - #if (defined __ARM_NEON__ || (defined __ARM_NEON && defined __aarch64__)) + #if defined __ARM_NEON have[CV_CPU_NEON] = true; #if (defined __ARM_FP && ((__ARM_FP & 0x2) != 0)) have[CV_CPU_FP16] = true; diff --git a/modules/flann/include/opencv2/flann/dist.h b/modules/flann/include/opencv2/flann/dist.h index 48540f7fdf..3029ebb5ef 100644 --- a/modules/flann/include/opencv2/flann/dist.h +++ b/modules/flann/include/opencv2/flann/dist.h @@ -49,7 +49,7 @@ typedef unsigned __int64 uint64_t; # include #endif -#if defined(__ARM_NEON__) && !defined(__CUDACC__) +#if defined(__ARM_NEON) && !defined(__CUDACC__) # include "arm_neon.h" #endif @@ -559,7 +559,7 @@ struct Hamming ResultType operator()(const Iterator1 a, const Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const { ResultType result = 0; -#if defined(__ARM_NEON__) && !defined(__CUDACC__) +#if defined(__ARM_NEON) && !defined(__CUDACC__) { const unsigned char* a2 = reinterpret_cast (a); const unsigned char* b2 = reinterpret_cast (b); @@ -611,7 +611,7 @@ struct Hamming { (void)b; ResultType result = 0; -#if defined(__ARM_NEON__) && !defined(__CUDACC__) +#if defined(__ARM_NEON) && !defined(__CUDACC__) { const unsigned char* a2 = reinterpret_cast (a); uint32x4_t bits = vmovq_n_u32(0);