* extend the Has* packet traits and makes all functor use it

* extend the packing routines to support conjugation
This commit is contained in:
Gael Guennebaud
2010-07-05 23:27:54 +02:00
parent e1eccfad3f
commit c69a226192
7 changed files with 85 additions and 58 deletions

View File

@@ -58,8 +58,11 @@ struct ei_default_packet_traits
HasMul = 1,
HasNegate = 1,
HasAbs = 1,
HasAbs2 = 1,
HasMin = 1,
HasMax = 1,
HasConj = 1,
HasSetLinear = 1,
HasDiv = 0,
HasSqrt = 0,
@@ -105,6 +108,10 @@ ei_psub(const Packet& a,
template<typename Packet> inline Packet
ei_pnegate(const Packet& a) { return -a; }
/** \internal \returns conj(a) (coeff-wise) */
template<typename Packet> inline Packet
ei_pconj(const Packet& a) { return ei_conj(a); }
/** \internal \returns a * b (coeff-wise) */
template<typename Packet> inline Packet
ei_pmul(const Packet& a,