mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
core(SIMD): fix MSA build - add v_reduce_min/max for u8/s8
This commit is contained in:
parent
301626ba26
commit
d42e04d0df
@ -1000,6 +1000,22 @@ OPENCV_HAL_IMPL_MSA_REDUCE_OP_4(v_int32x4, int, min, std::min)
|
|||||||
OPENCV_HAL_IMPL_MSA_REDUCE_OP_4(v_float32x4, float, max, std::max)
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_4(v_float32x4, float, max, std::max)
|
||||||
OPENCV_HAL_IMPL_MSA_REDUCE_OP_4(v_float32x4, float, min, std::min)
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_4(v_float32x4, float, min, std::min)
|
||||||
|
|
||||||
|
|
||||||
|
#define OPENCV_HAL_IMPL_MSA_REDUCE_OP_16(_Tpvec, scalartype, _Tpvec2, func) \
|
||||||
|
inline scalartype v_reduce_##func(const _Tpvec& a) \
|
||||||
|
{ \
|
||||||
|
_Tpvec2 a1, a2; \
|
||||||
|
v_expand(a, a1, a2); \
|
||||||
|
return (scalartype)v_reduce_##func(v_##func(a1, a2)); \
|
||||||
|
}
|
||||||
|
|
||||||
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_16(v_uint8x16, uchar, v_uint16x8, min)
|
||||||
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_16(v_uint8x16, uchar, v_uint16x8, max)
|
||||||
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_16(v_int8x16, char, v_int16x8, min)
|
||||||
|
OPENCV_HAL_IMPL_MSA_REDUCE_OP_16(v_int8x16, char, v_int16x8, max)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define OPENCV_HAL_IMPL_MSA_REDUCE_SUM(_Tpvec, scalartype, suffix) \
|
#define OPENCV_HAL_IMPL_MSA_REDUCE_SUM(_Tpvec, scalartype, suffix) \
|
||||||
inline scalartype v_reduce_sum(const _Tpvec& a) \
|
inline scalartype v_reduce_sum(const _Tpvec& a) \
|
||||||
{ \
|
{ \
|
||||||
|
Loading…
Reference in New Issue
Block a user