diff --git a/Eigen/src/Core/arch/NEON/Complex.h b/Eigen/src/Core/arch/NEON/Complex.h index 448600bb3f..2210d5a789 100644 --- a/Eigen/src/Core/arch/NEON/Complex.h +++ b/Eigen/src/Core/arch/NEON/Complex.h @@ -76,6 +76,7 @@ template<> struct unpacket_traits { typedef std::complex type; typedef Packet1cf half; + typedef Packet2f as_real; enum { size = 1, @@ -89,6 +90,7 @@ template<> struct unpacket_traits { typedef std::complex type; typedef Packet1cf half; + typedef Packet4f as_real; enum { size = 2, @@ -475,6 +477,8 @@ template<> struct packet_traits > : default_packet_traits template<> struct unpacket_traits { typedef std::complex type; + typedef Packet1cd half; + typedef Packet2d as_real; enum { size=1, @@ -483,7 +487,6 @@ template<> struct unpacket_traits masked_load_available=false, masked_store_available=false }; - typedef Packet1cd half; }; template<> EIGEN_STRONG_INLINE Packet1cd pload(const std::complex* from) @@ -640,6 +643,19 @@ EIGEN_STRONG_INLINE void ptranspose(PacketBlock& kernel) 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; } + +template<> EIGEN_STRONG_INLINE Packet1cf psqrt(const Packet1cf& a) { + return psqrt_complex(a); +} + +template<> EIGEN_STRONG_INLINE Packet2cf psqrt(const Packet2cf& a) { + return psqrt_complex(a); +} + +template<> EIGEN_STRONG_INLINE Packet1cd psqrt(const Packet1cd& a) { + return psqrt_complex(a); +} + #endif // EIGEN_ARCH_ARM64 } // end namespace internal