10 #ifndef EIGEN_COMPLEX_SSE_H 11 #define EIGEN_COMPLEX_SSE_H 52 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));
57 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
64 #ifdef EIGEN_VECTORIZE_SSE3 65 return Packet2cf(_mm_addsub_ps(_mm_mul_ps(_mm_moveldup_ps(a.v), b.v),
66 _mm_mul_ps(_mm_movehdup_ps(a.v),
72 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x00000000,0x80000000,0x00000000));
90 #if EIGEN_GNUC_AT_MOST(4,2) 92 res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), reinterpret_cast<const __m64*>(&from));
93 #elif EIGEN_GNUC_AT_LEAST(4,6) 95 #pragma GCC diagnostic push 96 #pragma GCC diagnostic ignored "-Wuninitialized" 97 res.v = _mm_loadl_pi(res.v, (
const __m64*)&from);
98 #pragma GCC diagnostic pop 100 res.v = _mm_loadl_pi(res.v, (
const __m64*)&from);
102 return Packet2cf(_mm_movelh_ps(res.v,res.v));
110 template<>
EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(
const std::complex<float> * addr) { _mm_prefetch((
const char*)(addr), _MM_HINT_T0); }
114 #if EIGEN_GNUC_AT_MOST(4,3) 118 _mm_store_ps((
float*)res, a.v);
121 std::complex<float> res;
122 _mm_storel_pi((__m64*)&res, a.v);
136 return Packet2cf(_mm_add_ps(_mm_movelh_ps(vecs[0].
v,vecs[1].v), _mm_movehl_ps(vecs[1].v,vecs[0].v)));
151 first.v = _mm_movehl_ps(first.v, first.v);
152 first.v = _mm_movelh_ps(first.v, second.v);
157 template<>
struct conj_helper<Packet2cf, Packet2cf, false,true>
164 #ifdef EIGEN_VECTORIZE_SSE3 167 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
175 template<>
struct conj_helper<Packet2cf, Packet2cf, true,false>
182 #ifdef EIGEN_VECTORIZE_SSE3 185 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
193 template<>
struct conj_helper<Packet2cf, Packet2cf, true,true>
200 #ifdef EIGEN_VECTORIZE_SSE3 203 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
233 __m128 s = _mm_mul_ps(b.v,b.v);
234 return Packet2cf(_mm_div_ps(res.v,_mm_add_ps(s,_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(s), 0xb1)))));
279 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
286 #ifdef EIGEN_VECTORIZE_SSE3 291 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
317 template<>
EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(
const std::complex<double> * addr) { _mm_prefetch((
const char*)(addr), _MM_HINT_T0); }
322 _mm_store_pd(res, a.v);
323 return std::complex<double>(res[0],res[1]);
360 #ifdef EIGEN_VECTORIZE_SSE3 363 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
378 #ifdef EIGEN_VECTORIZE_SSE3 381 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
396 #ifdef EIGEN_VECTORIZE_SSE3 399 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
429 __m128d s = _mm_mul_pd(b.v,b.v);
430 return Packet1cd(_mm_div_pd(res.
v, _mm_add_pd(s,_mm_shuffle_pd(s, s, 0x1))));
442 #endif // EIGEN_COMPLEX_SSE_H EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet4f &x, const Packet2cf &y, const Packet2cf &c) const
static EIGEN_STRONG_INLINE void run(Packet1cd &, const Packet1cd &)
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd &a, const Packet1cd &b) const
std::complex< double > type
EIGEN_STRONG_INLINE Packet2cf(const __m128 &a)
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf preduxp< Packet2cf >(const Packet2cf *vecs)
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd preduxp< Packet1cd >(const Packet1cd *vecs)
#define EIGEN_DEBUG_UNALIGNED_LOAD
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet1cd pmul(const Packet2d &x, const Packet1cd &y) const
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
#define EIGEN_DEBUG_ALIGNED_STORE
iterative scaling algorithm to equilibrate rows and column norms in matrices
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE Packet1cd()
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
#define EIGEN_DEBUG_UNALIGNED_STORE
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet1cd(const __m128d &a)
#define EIGEN_DEBUG_ALIGNED_LOAD
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
void pstore(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd &a, const Packet1cd &b) const
#define vec2d_swizzle1(v, p, q)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
void pstoreu(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet2d &x, const Packet1cd &y, const Packet1cd &c) const
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd &x, const Packet1cd &y, const Packet1cd &c) const
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd &x, const Packet1cd &y, const Packet1cd &c) const
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet4f &x, const Packet2cf &y) const
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
#define vec4f_swizzle1(v, p, q, r, s)
EIGEN_STRONG_INLINE Packet2cf()
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
unpacket_traits< Packet >::type pfirst(const Packet &a)
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd &a, const Packet1cd &b) const
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd &x, const Packet1cd &y, const Packet1cd &c) const
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd &x, const Packet2d &y, const Packet1cd &c) const
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd &x, const Packet2d &y) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet4f &y, const Packet2cf &c) const
static EIGEN_STRONG_INLINE void run(Packet2cf &first, const Packet2cf &second)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &x, const Packet4f &y) const
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Packet pmul(const Packet &a, const Packet &b)
std::complex< float > type
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar &x)
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Packet padd(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)