* add a IsVectorized mechanism (instead of packet-size>1...)

* vectorize complex<double>
This commit is contained in:
Gael Guennebaud
2010-07-06 23:36:00 +02:00
parent 38d0a0d5d6
commit bfa606d16f
9 changed files with 230 additions and 32 deletions

View File

@@ -85,8 +85,12 @@ static Packet4f ei_p4f_ZERO_ = (Packet4f) vec_sl((Packet4ui)ei_p4i_MINUS1, (Pack
template<> struct ei_packet_traits<float> : ei_default_packet_traits
{
typedef Packet4f type; enum {size=4};
typedef Packet4f type;
enum {
IsVectorized = 1,
size=4,
// FIXME check the Has*
HasSin = 0,
HasCos = 0,
HasLog = 0,
@@ -95,7 +99,14 @@ template<> struct ei_packet_traits<float> : ei_default_packet_traits
};
};
template<> struct ei_packet_traits<int> : ei_default_packet_traits
{ typedef Packet4i type; enum {size=4}; };
{
typedef Packet4i type;
enum {
// FIXME check the Has*
IsVectorized = 1,
size=4
};
};
template<> struct ei_unpacket_traits<Packet4f> { typedef float type; enum {size=4}; };
template<> struct ei_unpacket_traits<Packet4i> { typedef int type; enum {size=4}; };