mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-08 09:49:03 +08:00
Improve plogical_shift_* implementations and fix typo in SVE/PacketMath.h
This commit is contained in:
parent
ac5c83a3f5
commit
32a3f9ac33
@ -151,7 +151,7 @@ EIGEN_STRONG_INLINE PacketXi pmax<PacketXi>(const PacketXi& a, const PacketXi& b
|
|||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE PacketXi pcmp_le<PacketXi>(const PacketXi& a, const PacketXi& b)
|
EIGEN_STRONG_INLINE PacketXi pcmp_le<PacketXi>(const PacketXi& a, const PacketXi& b)
|
||||||
{
|
{
|
||||||
return svdup_n_s32_z(svcmplt_s32(svptrue_b32(), a, b), 0xffffffffu);
|
return svdup_n_s32_z(svcmple_s32(svptrue_b32(), a, b), 0xffffffffu);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -211,13 +211,13 @@ EIGEN_STRONG_INLINE PacketXi parithmetic_shift_right(PacketXi a)
|
|||||||
template <int N>
|
template <int N>
|
||||||
EIGEN_STRONG_INLINE PacketXi plogical_shift_right(PacketXi a)
|
EIGEN_STRONG_INLINE PacketXi plogical_shift_right(PacketXi a)
|
||||||
{
|
{
|
||||||
return svreinterpret_s32_u32(svlsr_u32_z(svptrue_b32(), svreinterpret_u32_s32(a), svdup_n_u32_z(svptrue_b32(), N)));
|
return svreinterpret_s32_u32(svlsr_n_u32_z(svptrue_b32(), svreinterpret_u32_s32(a), N));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int N>
|
template <int N>
|
||||||
EIGEN_STRONG_INLINE PacketXi plogical_shift_left(PacketXi a)
|
EIGEN_STRONG_INLINE PacketXi plogical_shift_left(PacketXi a)
|
||||||
{
|
{
|
||||||
return svlsl_s32_z(svptrue_b32(), a, svdup_n_u32_z(svptrue_b32(), N));
|
return svlsl_n_s32_z(svptrue_b32(), a, N);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -525,7 +525,7 @@ EIGEN_STRONG_INLINE PacketXf pmax<PropagateNumbers, PacketXf>(const PacketXf& a,
|
|||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE PacketXf pcmp_le<PacketXf>(const PacketXf& a, const PacketXf& b)
|
EIGEN_STRONG_INLINE PacketXf pcmp_le<PacketXf>(const PacketXf& a, const PacketXf& b)
|
||||||
{
|
{
|
||||||
return svreinterpret_f32_u32(svdup_n_u32_z(svcmplt_f32(svptrue_b32(), a, b), 0xffffffffu));
|
return svreinterpret_f32_u32(svdup_n_u32_z(svcmple_f32(svptrue_b32(), a, b), 0xffffffffu));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user