mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-13 01:43:13 +08:00
Fix a bug for pcmp_lt_or_nan and Add sqrt support for SVE
This commit is contained in:
parent
9315389795
commit
072ec9d954
@ -358,7 +358,7 @@ struct packet_traits<float> : default_packet_traits {
|
|||||||
HasCos = EIGEN_FAST_MATH,
|
HasCos = EIGEN_FAST_MATH,
|
||||||
HasLog = 1,
|
HasLog = 1,
|
||||||
HasExp = 1,
|
HasExp = 1,
|
||||||
HasSqrt = 0,
|
HasSqrt = 1,
|
||||||
HasTanh = EIGEN_FAST_MATH,
|
HasTanh = EIGEN_FAST_MATH,
|
||||||
HasErf = EIGEN_FAST_MATH
|
HasErf = EIGEN_FAST_MATH
|
||||||
};
|
};
|
||||||
@ -478,12 +478,12 @@ EIGEN_STRONG_INLINE PacketXf pcmp_eq<PacketXf>(const PacketXf& a, const PacketXf
|
|||||||
return svreinterpret_f32_u32(svdup_n_u32_z(svcmpeq_f32(svptrue_b32(), a, b), 0xffffffffu));
|
return svreinterpret_f32_u32(svdup_n_u32_z(svcmpeq_f32(svptrue_b32(), a, b), 0xffffffffu));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do a predicate inverse (svnot_b_x) on the predicate resulted from the
|
// Do a predicate inverse (svnot_b_z) on the predicate resulted from the
|
||||||
// greater/equal comparison (svcmpge_f32). Then fill a float vector with the
|
// greater/equal comparison (svcmpge_f32). Then fill a float vector with the
|
||||||
// active elements.
|
// active elements.
|
||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE PacketXf pcmp_lt_or_nan<PacketXf>(const PacketXf& a, const PacketXf& b) {
|
EIGEN_STRONG_INLINE PacketXf pcmp_lt_or_nan<PacketXf>(const PacketXf& a, const PacketXf& b) {
|
||||||
return svreinterpret_f32_u32(svdup_n_u32_z(svnot_b_x(svptrue_b32(), svcmpge_f32(svptrue_b32(), a, b)), 0xffffffffu));
|
return svreinterpret_f32_u32(svdup_n_u32_z(svnot_b_z(svptrue_b32(), svcmpge_f32(svptrue_b32(), a, b)), 0xffffffffu));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -660,6 +660,11 @@ EIGEN_STRONG_INLINE PacketXf pldexp<PacketXf>(const PacketXf& a, const PacketXf&
|
|||||||
return pldexp_generic(a, exponent);
|
return pldexp_generic(a, exponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE PacketXf psqrt<PacketXf>(const PacketXf& a) {
|
||||||
|
return svsqrt_f32_x(svptrue_b32(), a);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
} // namespace Eigen
|
} // namespace Eigen
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user