11 #ifndef EIGEN_GEOMETRY_SSE_H 12 #define EIGEN_GEOMETRY_SSE_H 18 template<
class Derived,
class OtherDerived>
24 const __m128 mask = _mm_setr_ps(0.
f,0.
f,0.
f,-0.
f);
25 __m128 a = _a.
coeffs().template packet<Aligned16>(0);
26 __m128 b = _b.
coeffs().template packet<Aligned16>(0);
33 _mm_xor_ps(mask,_mm_add_ps(s1,s2))));
39 template<
class Derived,
int Alignment>
45 const __m128 mask = _mm_setr_ps(-0.
f,-0.
f,-0.
f,0.
f);
46 pstore(&res.
x(), _mm_xor_ps(mask, q.
coeffs().template packet<Alignment>(0)));
52 template<
typename VectorLhs,
typename VectorRhs>
56 run(
const VectorLhs& lhs,
const VectorRhs& rhs)
58 __m128 a = lhs.template packet<traits<VectorLhs>::Alignment>(0);
59 __m128 b = rhs.template packet<traits<VectorRhs>::Alignment>(0);
63 pstore(&res.x(),_mm_sub_ps(mul1,mul2));
71 template<
class Derived,
class OtherDerived,
int Alignment>
76 const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
80 const double* a = _a.
coeffs().data();
98 #ifdef EIGEN_VECTORIZE_SSE3 112 #ifdef EIGEN_VECTORIZE_SSE3 123 template<
class Derived,
int Alignment>
129 const __m128d mask0 = _mm_setr_pd(-0.,-0.);
130 const __m128d mask2 = _mm_setr_pd(-0.,0.);
131 pstore(&res.
x(), _mm_xor_pd(mask0, q.
coeffs().template packet<Alignment>(0)));
132 pstore(&res.
z(), _mm_xor_pd(mask2, q.
coeffs().template packet<Alignment>(2)));
141 #endif // EIGEN_GEOMETRY_SSE_H static plain_matrix_type< VectorLhs >::type run(const VectorLhs &lhs, const VectorRhs &rhs)
static Quaternion< float > run(const QuaternionBase< Derived > &_a, const QuaternionBase< OtherDerived > &_b)
EIGEN_DEVICE_FUNC Scalar x() const
EIGEN_DEVICE_FUNC Scalar z() const
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
static Quaternion< double > run(const QuaternionBase< Derived > &q)
#define vec4f_swizzle1(v, p, q, r, s)
EIGEN_DEVICE_FUNC const internal::traits< Derived >::Coefficients & coeffs() const
Base class for quaternion expressions.
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
The quaternion class used to represent 3D orientations and rotations.
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
EIGEN_DEVICE_FUNC Packet pxor(const Packet &a, const Packet &b)
static Quaternion< float > run(const QuaternionBase< Derived > &q)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
#define EIGEN_UNUSED_VARIABLE(var)
static Quaternion< double > run(const QuaternionBase< Derived > &_a, const QuaternionBase< OtherDerived > &_b)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)