diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-03-28 10:18:04 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-03-28 10:18:04 +0100 |
commit | 10aa14592a179931ad605bce44a64b31a79ce007 (patch) | |
tree | 2ec0fa8b6cb5690e6877dafb0b13b77f9297092f /Eigen/src/Core/arch/SSE | |
parent | 8d2bb2c20d8b5de9687afa9bde0a866b1c5b9c6d (diff) |
Add a mechanism to recursively access to half-size packet types
Diffstat (limited to 'Eigen/src/Core/arch/SSE')
-rw-r--r-- | Eigen/src/Core/arch/SSE/Complex.h | 4 | ||||
-rwxr-xr-x | Eigen/src/Core/arch/SSE/PacketMath.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 86b90b2ee..694979e19 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -28,10 +28,12 @@ struct Packet2cf template<> struct packet_traits<std::complex<float> > : default_packet_traits { typedef Packet2cf type; + typedef Packet2cf half; enum { Vectorizable = 1, AlignedOnScalar = 1, size = 2, + HasHalfPacket = 0, HasAdd = 1, HasSub = 1, @@ -276,10 +278,12 @@ struct Packet1cd template<> struct packet_traits<std::complex<double> > : default_packet_traits { typedef Packet1cd type; + typedef Packet1cd half; enum { Vectorizable = 1, AlignedOnScalar = 0, size = 1, + HasHalfPacket = 0, HasAdd = 1, HasSub = 1, diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index a98ca6bea..ea05a3415 100755 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -64,10 +64,12 @@ template<> struct is_arithmetic<__m128d> { enum { value = true }; }; template<> struct packet_traits<float> : default_packet_traits { typedef Packet4f type; + typedef Packet4f half; enum { Vectorizable = 1, AlignedOnScalar = 1, size=4, + HasHalfPacket = 0, HasDiv = 1, HasSin = EIGEN_FAST_MATH, @@ -80,10 +82,12 @@ template<> struct packet_traits<float> : default_packet_traits template<> struct packet_traits<double> : default_packet_traits { typedef Packet2d type; + typedef Packet2d half; enum { Vectorizable = 1, AlignedOnScalar = 1, size=2, + HasHalfPacket = 0, HasDiv = 1, HasExp = 1, @@ -94,6 +98,7 @@ template<> struct packet_traits<double> : default_packet_traits template<> struct packet_traits<int> : default_packet_traits { typedef Packet4i type; + typedef Packet4i half; enum { // FIXME check the Has* Vectorizable = 1, |