26 #ifndef EIGEN_GEOMETRY_SSE_H
27 #define EIGEN_GEOMETRY_SSE_H
33 template<
class Derived,
class OtherDerived>
34 struct quat_product<Architecture::
SSE, Derived, OtherDerived, float,
Aligned>
36 static inline Quaternion<float> run(
const QuaternionBase<Derived>& _a,
const QuaternionBase<OtherDerived>& _b)
38 const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0,0,0,0x80000000));
39 Quaternion<float> res;
40 __m128 a = _a.coeffs().template packet<Aligned>(0);
41 __m128 b = _b.coeffs().template packet<Aligned>(0);
50 _mm_add_ps(flip1,flip2)));
55 template<
typename VectorLhs,
typename VectorRhs>
56 struct cross3_impl<Architecture::
SSE,VectorLhs,VectorRhs,float,true>
58 static inline typename plain_matrix_type<VectorLhs>::type
59 run(
const VectorLhs& lhs,
const VectorRhs& rhs)
61 __m128 a = lhs.template packet<VectorLhs::Flags&AlignedBit ? Aligned : Unaligned>(0);
62 __m128 b = rhs.template packet<VectorRhs::Flags&AlignedBit ? Aligned : Unaligned>(0);
65 typename plain_matrix_type<VectorLhs>::type res;
66 pstore(&res.x(),_mm_sub_ps(mul1,mul2));
74 template<
class Derived,
class OtherDerived>
75 struct quat_product<Architecture::
SSE, Derived, OtherDerived, double,
Aligned>
77 static inline Quaternion<double> run(
const QuaternionBase<Derived>& _a,
const QuaternionBase<OtherDerived>& _b)
79 const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
81 Quaternion<double> res;
83 const double* a = _a.coeffs().data();
84 Packet2d b_xy = _b.coeffs().template packet<Aligned>(0);
85 Packet2d b_zw = _b.coeffs().template packet<Aligned>(2);
101 #ifdef EIGEN_VECTORIZE_SSE3
115 #ifdef EIGEN_VECTORIZE_SSE3
130 #endif // EIGEN_GEOMETRY_SSE_H