11 #ifndef EIGEN_GEOMETRY_SSE_H
12 #define EIGEN_GEOMETRY_SSE_H
18 template<
class Derived,
class OtherDerived>
29 const __m128 mask = _mm_setr_ps(0.f,0.f,0.f,-0.f);
30 __m128
a = _a.
coeffs().template packet<AAlignment>(0);
31 __m128
b = _b.
coeffs().template packet<BAlignment>(0);
34 pstoret<float,Packet4f,ResAlignment>(
39 _mm_xor_ps(mask,_mm_add_ps(s1,s2))));
45 template<
class Derived>
54 const __m128 mask = _mm_setr_ps(-0.f,-0.f,-0.f,0.f);
61 template<
typename VectorLhs,
typename VectorRhs>
68 run(
const VectorLhs& lhs,
const VectorRhs& rhs)
70 __m128
a = lhs.template packet<traits<VectorLhs>::Alignment>(0);
71 __m128
b = rhs.template packet<traits<VectorRhs>::Alignment>(0);
75 pstoret<float,Packet4f,ResAlignment>(&res.x(),_mm_sub_ps(mul1,mul2));
83 template<
class Derived,
class OtherDerived>
93 const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
97 const double*
a = _a.
coeffs().data();
115 #ifdef EIGEN_VECTORIZE_SSE3
117 pstoret<double,Packet2d,ResAlignment>(&res.x(), _mm_addsub_pd(t1,
preverse(t2)));
119 pstoret<double,Packet2d,ResAlignment>(&res.x(),
padd(t1,
pxor(mask,
preverse(t2))));
129 #ifdef EIGEN_VECTORIZE_SSE3
131 pstoret<double,Packet2d,ResAlignment>(&res.z(),
preverse(_mm_addsub_pd(
preverse(t1), t2)));
133 pstoret<double,Packet2d,ResAlignment>(&res.z(),
psub(t1,
pxor(mask,
preverse(t2))));
140 template<
class Derived>
149 const __m128d mask0 = _mm_setr_pd(-0.,-0.);
150 const __m128d mask2 = _mm_setr_pd(-0.,0.);
161 #endif // EIGEN_GEOMETRY_SSE_H