From ce1410e77c01a0b7d67c8426981a117bb3d18dfb Mon Sep 17 00:00:00 2001 From: OpenCV China Date: Tue, 29 Apr 2025 16:39:02 +0800 Subject: [PATCH] fix: added v_gt and v_lt with lsx and lasx to fix build --- modules/core/include/opencv2/core/hal/intrin_lasx.hpp | 6 +++++- modules/core/include/opencv2/core/hal/intrin_lsx.hpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/hal/intrin_lasx.hpp b/modules/core/include/opencv2/core/hal/intrin_lasx.hpp index 3661b7ef32..97df327767 100644 --- a/modules/core/include/opencv2/core/hal/intrin_lasx.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_lasx.hpp @@ -1010,7 +1010,11 @@ OPENCV_HAL_IMPL_LASX_CMP_OP_INT(v_uint32x8, v_int32x8, w, wu) inline _Tpvec v_eq(const _Tpvec& a, const _Tpvec& b) \ { return _Tpvec(__lasx_xvseq_##suffix(a.val, b.val)); } \ inline _Tpvec v_ne(const _Tpvec& a, const _Tpvec& b) \ - { return v_not(v_eq(a, b)); } + { return v_not(v_eq(a, b)); } \ + inline _Tpvec v_gt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(__lasx_xvslt_##suffix(b.val, a.val)); } \ + inline _Tpvec v_lt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(__lasx_xvslt_##suffix(a.val, b.val)); } OPENCV_HAL_IMPL_LASX_CMP_OP_64BIT(v_uint64x4, d) OPENCV_HAL_IMPL_LASX_CMP_OP_64BIT(v_int64x4, d) diff --git a/modules/core/include/opencv2/core/hal/intrin_lsx.hpp b/modules/core/include/opencv2/core/hal/intrin_lsx.hpp index a2f23d6abe..bc720e0a4b 100644 --- a/modules/core/include/opencv2/core/hal/intrin_lsx.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_lsx.hpp @@ -783,7 +783,11 @@ OPENCV_HAL_IMPL_LSX_CMP_OP_INT(v_uint32x4, v_int32x4, w, wu) inline _Tpvec v_eq(const _Tpvec& a, const _Tpvec& b) \ { return _Tpvec(__lsx_vseq_##suffix(a.val, b.val)); } \ inline _Tpvec v_ne(const _Tpvec& a, const _Tpvec& b) \ - { return v_not(v_eq(a, b)); } + { return v_not(v_eq(a, b)); } \ + inline _Tpvec v_gt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(__lsx_vslt_##suffix(b.val, a.val)); } \ + inline _Tpvec v_lt(const _Tpvec& a, const _Tpvec& b) \ + { return _Tpvec(__lsx_vslt_##suffix(a.val, b.val)); } OPENCV_HAL_IMPL_LSX_CMP_OP_64BIT(v_uint64x2, d) OPENCV_HAL_IMPL_LSX_CMP_OP_64BIT(v_int64x2, d)