From 10294a84faca9caf85153023fa56ec94df4e37ed Mon Sep 17 00:00:00 2001 From: Zhang Na Date: Tue, 4 Jul 2023 19:19:05 +0800 Subject: [PATCH] Fix LoongArch Macro Definition --- 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 47a2948222..bc7f36264a 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -354,7 +354,7 @@ CV_INLINE int cvFloor( float value ) #if defined CV__FASTMATH_ENABLE_GCC_MATH_BUILTINS || \ defined CV__FASTMATH_ENABLE_CLANG_MATH_BUILTINS return (int)__builtin_floorf(value); -#elif defined __loongarch +#elif defined __loongarch__ int i; float tmp; __asm__ ("ftintrm.w.s %[tmp], %[in] \n\t" @@ -381,7 +381,7 @@ CV_INLINE int cvCeil( float value ) #if defined CV__FASTMATH_ENABLE_GCC_MATH_BUILTINS || \ defined CV__FASTMATH_ENABLE_CLANG_MATH_BUILTINS return (int)__builtin_ceilf(value); -#elif defined __loongarch +#elif defined __loongarch__ int i; float tmp; __asm__ ("ftintrp.w.s %[tmp], %[in] \n\t"