mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Fix v_signmask for RISC-V Vector.
This commit is contained in:
parent
04ebedb6f0
commit
df24bd295d
@ -1618,7 +1618,7 @@ inline int v_signmask(const _Tpvec& a) \
|
|||||||
{ \
|
{ \
|
||||||
uint8_t ans[4] = {0}; \
|
uint8_t ans[4] = {0}; \
|
||||||
vsm(ans, vmslt(a, 0, VTraits<_Tpvec>::vlanes()), VTraits<_Tpvec>::vlanes()); \
|
vsm(ans, vmslt(a, 0, VTraits<_Tpvec>::vlanes()), VTraits<_Tpvec>::vlanes()); \
|
||||||
return *(reinterpret_cast<int*>(ans)); \
|
return *(reinterpret_cast<int*>(ans)) & (((__int128_t)1 << VTraits<_Tpvec>::vlanes()) - 1); \
|
||||||
} \
|
} \
|
||||||
inline int v_scan_forward(const _Tpvec& a) \
|
inline int v_scan_forward(const _Tpvec& a) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -1081,6 +1081,7 @@ template<typename R> struct TheTest
|
|||||||
typedef typename VTraits<uint_reg>::lane_type uint_type;
|
typedef typename VTraits<uint_reg>::lane_type uint_type;
|
||||||
|
|
||||||
Data<R> dataA, dataB(0), dataC, dataD(1), dataE(2);
|
Data<R> dataA, dataB(0), dataC, dataD(1), dataE(2);
|
||||||
|
dataA[0] = std::numeric_limits<int_type>::max();
|
||||||
dataA[1] *= (LaneType)-1;
|
dataA[1] *= (LaneType)-1;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user