From f7d3850183a2e31e6f05bef7373bd9f75b6ee2c3 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 7 Nov 2025 12:39:28 +0300 Subject: [PATCH] Use rounding intrinsic on Windows for ARM. --- modules/core/include/opencv2/core/fast_math.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/fast_math.hpp b/modules/core/include/opencv2/core/fast_math.hpp index e136327207..370f5b439b 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -201,7 +201,7 @@ cvRound( double value ) { #if defined CV_INLINE_ROUND_DBL CV_INLINE_ROUND_DBL(value); -#elif defined _MSC_VER && defined _M_ARM64 +#elif defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC)) float64x1_t v = vdup_n_f64(value); int64x1_t r = vcvtn_s64_f64(v); return static_cast(vget_lane_s64(r, 0)); @@ -327,7 +327,7 @@ CV_INLINE int cvRound(float value) { #if defined CV_INLINE_ROUND_FLT CV_INLINE_ROUND_FLT(value); -#elif defined _MSC_VER && defined _M_ARM64 +#elif defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC)) float32x2_t v = vdup_n_f32(value); int32x2_t r = vcvtn_s32_f32(v); return vget_lane_s32(r, 0);