mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-29 15:24:51 +08:00
Fix vectorization of complex sqrt on NEON
This commit is contained in:
parent
8eb461a431
commit
00be0a7ff3
@ -76,6 +76,7 @@ template<> struct unpacket_traits<Packet1cf>
|
|||||||
{
|
{
|
||||||
typedef std::complex<float> type;
|
typedef std::complex<float> type;
|
||||||
typedef Packet1cf half;
|
typedef Packet1cf half;
|
||||||
|
typedef Packet2f as_real;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
size = 1,
|
size = 1,
|
||||||
@ -89,6 +90,7 @@ template<> struct unpacket_traits<Packet2cf>
|
|||||||
{
|
{
|
||||||
typedef std::complex<float> type;
|
typedef std::complex<float> type;
|
||||||
typedef Packet1cf half;
|
typedef Packet1cf half;
|
||||||
|
typedef Packet4f as_real;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
size = 2,
|
size = 2,
|
||||||
@ -475,6 +477,8 @@ template<> struct packet_traits<std::complex<double> > : default_packet_traits
|
|||||||
template<> struct unpacket_traits<Packet1cd>
|
template<> struct unpacket_traits<Packet1cd>
|
||||||
{
|
{
|
||||||
typedef std::complex<double> type;
|
typedef std::complex<double> type;
|
||||||
|
typedef Packet1cd half;
|
||||||
|
typedef Packet2d as_real;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
size=1,
|
size=1,
|
||||||
@ -483,7 +487,6 @@ template<> struct unpacket_traits<Packet1cd>
|
|||||||
masked_load_available=false,
|
masked_load_available=false,
|
||||||
masked_store_available=false
|
masked_store_available=false
|
||||||
};
|
};
|
||||||
typedef Packet1cd half;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<> EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from)
|
template<> EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(const std::complex<double>* from)
|
||||||
@ -640,6 +643,19 @@ EIGEN_STRONG_INLINE void ptranspose(PacketBlock<Packet1cd,2>& kernel)
|
|||||||
kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));
|
kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));
|
||||||
kernel.packet[1].v = tmp;
|
kernel.packet[1].v = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<> EIGEN_STRONG_INLINE Packet1cf psqrt<Packet1cf>(const Packet1cf& a) {
|
||||||
|
return psqrt_complex<Packet1cf>(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<> EIGEN_STRONG_INLINE Packet2cf psqrt<Packet2cf>(const Packet2cf& a) {
|
||||||
|
return psqrt_complex<Packet2cf>(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<> EIGEN_STRONG_INLINE Packet1cd psqrt<Packet1cd>(const Packet1cd& a) {
|
||||||
|
return psqrt_complex<Packet1cd>(a);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // EIGEN_ARCH_ARM64
|
#endif // EIGEN_ARCH_ARM64
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user