10 #ifndef EIGEN_COMPLEX_SSE_H 11 #define EIGEN_COMPLEX_SSE_H 27 #ifndef EIGEN_VECTORIZE_AVX 59 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x80000000,0x80000000,0x80000000));
64 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
70 #ifdef EIGEN_VECTORIZE_SSE3 71 return Packet2cf(_mm_addsub_ps(_mm_mul_ps(_mm_moveldup_ps(a.v),
b.v),
72 _mm_mul_ps(_mm_movehdup_ps(a.v),
78 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x80000000,0x00000000,0x80000000,0x00000000));
96 #if EIGEN_GNUC_AT_MOST(4,2) 98 res.v = _mm_loadl_pi(_mm_set1_ps(0.0
f), reinterpret_cast<const __m64*>(&from));
99 #elif EIGEN_GNUC_AT_LEAST(4,6) 101 #pragma GCC diagnostic push 102 #pragma GCC diagnostic ignored "-Wuninitialized" 103 res.v = _mm_loadl_pi(res.v, (
const __m64*)&from);
104 #pragma GCC diagnostic pop 106 res.v = _mm_loadl_pi(res.v, (
const __m64*)&from);
108 return Packet2cf(_mm_movelh_ps(res.v,res.v));
117 template<> EIGEN_DEVICE_FUNC
inline Packet2cf pgather<std::complex<float>,
Packet2cf>(
const std::complex<float>* from,
Index stride)
123 template<> EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<float>,
Packet2cf>(std::complex<float>* to,
const Packet2cf& from,
Index stride)
125 to[stride*0] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 0)),
126 _mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 1)));
127 to[stride*1] = std::complex<float>(_mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 2)),
128 _mm_cvtss_f32(_mm_shuffle_ps(from.v, from.v, 3)));
135 #if EIGEN_GNUC_AT_MOST(4,3) 139 _mm_store_ps((
float*)res, a.v);
142 std::complex<float>
res;
143 _mm_storel_pi((__m64*)&res, a.v);
157 return Packet2cf(_mm_add_ps(_mm_movelh_ps(vecs[0].
v,vecs[1].v), _mm_movehl_ps(vecs[1].v,vecs[0].v)));
172 first.v = _mm_movehl_ps(first.v, first.v);
173 first.v = _mm_movelh_ps(first.v, second.v);
178 template<>
struct conj_helper<Packet2cf, Packet2cf, false,true>
185 #ifdef EIGEN_VECTORIZE_SSE3 188 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
196 template<>
struct conj_helper<Packet2cf, Packet2cf, true,false>
203 #ifdef EIGEN_VECTORIZE_SSE3 206 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
214 template<>
struct conj_helper<Packet2cf, Packet2cf, true,true>
221 #ifdef EIGEN_VECTORIZE_SSE3 224 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0x00000000,0x80000000,0x00000000,0x80000000));
238 __m128
s = _mm_mul_ps(
b.v,
b.v);
239 return Packet2cf(_mm_div_ps(res.v,_mm_add_ps(s,_mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(s), 0xb1)))));
258 #ifndef EIGEN_VECTORIZE_AVX 290 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0
x0,0
x0,0
x0));
296 #ifdef EIGEN_VECTORIZE_SSE3 297 return Packet1cd(_mm_addsub_pd(_mm_mul_pd(_mm_movedup_pd(a.v),
b.v),
301 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0
x0,0
x0,0x80000000,0
x0));
332 _mm_store_pd(res, a.v);
333 return std::complex<double>(res[0],res[1]);
370 #ifdef EIGEN_VECTORIZE_SSE3 373 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0
x0,0
x0,0
x0));
388 #ifdef EIGEN_VECTORIZE_SSE3 391 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0
x0,0
x0,0
x0));
406 #ifdef EIGEN_VECTORIZE_SSE3 409 const __m128d mask = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0
x0,0
x0,0
x0));
423 __m128d
s = _mm_mul_pd(b.v,b.v);
424 return Packet1cd(_mm_div_pd(res.
v, _mm_add_pd(s,_mm_shuffle_pd(s, s, 0
x1))));
432 EIGEN_DEVICE_FUNC
inline void 434 __m128d w1 = _mm_castps_pd(kernel.
packet[0].v);
435 __m128d w2 = _mm_castps_pd(kernel.
packet[1].v);
437 __m128 tmp = _mm_castpd_ps(_mm_unpackhi_pd(w1, w2));
438 kernel.
packet[0].v = _mm_castpd_ps(_mm_unpacklo_pd(w1, w2));
443 __m128d
result = pblend<Packet2d>(ifPacket, _mm_castps_pd(thenPacket.v), _mm_castps_pd(elsePacket.v));
449 return Packet2cf(_mm_loadl_pi(a.v, reinterpret_cast<const __m64*>(&b)));
459 return Packet2cf(_mm_loadh_pi(a.v, reinterpret_cast<const __m64*>(&b)));
471 #endif // EIGEN_COMPLEX_SSE_H EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) 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
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE Packet2cf(const __m128 &a)
EIGEN_DEVICE_FUNC internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar &x)
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
EIGEN_STRONG_INLINE Packet4cf pinsertfirst(const Packet4cf &a, std::complex< float > 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 pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
#define EIGEN_DEBUG_ALIGNED_STORE
Namespace containing all symbols from the Eigen library.
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 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 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)
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
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
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet1cd pmadd(const Packet1cd &x, const Packet1cd &y, const Packet1cd &c) const
constexpr int first(int i)
Implementation details for constexpr functions.
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 void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
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_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
EIGEN_DEVICE_FUNC 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
const char * SsePrefetchPtrType
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 std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
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_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
static EIGEN_STRONG_INLINE void run(Packet2cf &first, const Packet2cf &second)
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet4cf pinsertlast(const Packet4cf &a, std::complex< float > b)
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
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)
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)