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)