mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* remove debug code commited by mistake in Assign
* keep going on the doc: added a short geometry tutorial
This commit is contained in:
@@ -299,58 +299,28 @@ struct ei_assign_impl<Derived1, Derived2, InnerVectorization, InnerUnrolling>
|
||||
*** Linear vectorization ***
|
||||
***************************/
|
||||
|
||||
// template<typename Derived1, typename Derived2>
|
||||
// struct ei_assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
|
||||
// {
|
||||
// static void run(Derived1 &dst, const Derived2 &src)
|
||||
// {
|
||||
// const int size = dst.size();
|
||||
// const int packetSize = ei_packet_traits<typename Derived1::Scalar>::size;
|
||||
// const int alignedStart = ei_assign_traits<Derived1,Derived2>::DstIsAligned ? 0
|
||||
// : ei_alignmentOffset(&dst.coeffRef(0), size);
|
||||
// const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;
|
||||
//
|
||||
// for(int index = 0; index < alignedStart; index++)
|
||||
// dst.copyCoeff(index, src);
|
||||
//
|
||||
// for(int index = alignedStart; index < alignedEnd; index += packetSize)
|
||||
// {
|
||||
// dst.template copyPacket<Derived2, Aligned, ei_assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
|
||||
// }
|
||||
//
|
||||
// for(int index = alignedEnd; index < size; index++)
|
||||
// dst.copyCoeff(index, src);
|
||||
// }
|
||||
// };
|
||||
template<typename Derived1, typename Derived2>
|
||||
struct ei_assign_impl<Derived1, Derived2, LinearVectorization, NoUnrolling>
|
||||
{
|
||||
static void run(Derived1 &dst, const Derived2 &src)
|
||||
{
|
||||
asm("#begin");
|
||||
const int size = dst.size();
|
||||
const int packetSize = ei_packet_traits<typename Derived1::Scalar>::size;
|
||||
const int alignedStart = ei_assign_traits<Derived1,Derived2>::DstIsAligned ? 0
|
||||
: ei_alignmentOffset(&dst.coeffRef(0), size);
|
||||
const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;
|
||||
static void run(Derived1 &dst, const Derived2 &src)
|
||||
{
|
||||
const int size = dst.size();
|
||||
const int packetSize = ei_packet_traits<typename Derived1::Scalar>::size;
|
||||
const int alignedStart = ei_assign_traits<Derived1,Derived2>::DstIsAligned ? 0
|
||||
: ei_alignmentOffset(&dst.coeffRef(0), size);
|
||||
const int alignedEnd = alignedStart + ((size-alignedStart)/packetSize)*packetSize;
|
||||
|
||||
asm("#unaligned start");
|
||||
for(int index = 0; index < alignedStart; index++)
|
||||
dst.copyCoeff(index, src);
|
||||
|
||||
for(int index = 0; index < alignedStart; index++)
|
||||
dst.copyCoeff(index, src);
|
||||
asm("#aligned middle");
|
||||
for(int index = alignedStart; index < alignedEnd; index += packetSize)
|
||||
{
|
||||
dst.template copyPacket<Derived2, Aligned, ei_assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
|
||||
}
|
||||
|
||||
for(int index = alignedStart; index < alignedEnd; index += packetSize)
|
||||
{
|
||||
dst.template copyPacket<Derived2, Aligned, ei_assign_traits<Derived1,Derived2>::SrcAlignment>(index, src);
|
||||
}
|
||||
|
||||
asm("#unaligned end");
|
||||
|
||||
for(int index = alignedEnd; index < size; index++)
|
||||
dst.copyCoeff(index, src);
|
||||
asm("#end");
|
||||
}
|
||||
for(int index = alignedEnd; index < size; index++)
|
||||
dst.copyCoeff(index, src);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Derived1, typename Derived2>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef EIGEN_ANGLEAXIS_H
|
||||
#define EIGEN_ANGLEAXIS_H
|
||||
|
||||
/** \geometry_module \ingroup Geometry
|
||||
/** \geometry_module \ingroup GeometryModule
|
||||
*
|
||||
* \class AngleAxis
|
||||
*
|
||||
@@ -122,10 +122,10 @@ public:
|
||||
Matrix3 toRotationMatrix(void) const;
|
||||
};
|
||||
|
||||
/** \ingroup Geometry
|
||||
/** \ingroup GeometryModule
|
||||
* single precision angle-axis type */
|
||||
typedef AngleAxis<float> AngleAxisf;
|
||||
/** \ingroup Geometry
|
||||
/** \ingroup GeometryModule
|
||||
* double precision angle-axis type */
|
||||
typedef AngleAxis<double> AngleAxisd;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ template<typename Other,
|
||||
int OtherCols=Other::ColsAtCompileTime>
|
||||
struct ei_quaternion_assign_impl;
|
||||
|
||||
/** \geometry_module \ingroup Geometry
|
||||
/** \geometry_module \ingroup GeometryModule
|
||||
*
|
||||
* \class Quaternion
|
||||
*
|
||||
@@ -169,10 +169,10 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/** \ingroup Geometry
|
||||
/** \ingroup GeometryModule
|
||||
* single precision quaternion type */
|
||||
typedef Quaternion<float> Quaternionf;
|
||||
/** \ingroup Geometry
|
||||
/** \ingroup GeometryModule
|
||||
* double precision quaternion type */
|
||||
typedef Quaternion<double> Quaterniond;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ struct ToRotationMatrix<Scalar, Dim, MatrixBase<OtherDerived> >
|
||||
}
|
||||
};
|
||||
|
||||
/** \geometry_module \ingroup Geometry
|
||||
/** \geometry_module \ingroup GeometryModule
|
||||
*
|
||||
* \class Rotation2D
|
||||
*
|
||||
@@ -114,7 +114,7 @@ struct ToRotationMatrix<Scalar, Dim, MatrixBase<OtherDerived> >
|
||||
* This class is equivalent to a single scalar representing a counter clock wise rotation
|
||||
* as a single angle in radian. It provides some additional features such as the automatic
|
||||
* conversion from/to a 2x2 rotation matrix. Moreover this class aims to provide a similar
|
||||
* interface to Quaternion in order to facilitate the writing of generic algorithm
|
||||
* interface to Quaternion in order to facilitate the writing of generic algorithms
|
||||
* dealing with rotations.
|
||||
*
|
||||
* \sa class Quaternion, class Transform
|
||||
|
||||
@@ -35,7 +35,7 @@ template< typename Other,
|
||||
int OtherCols=Other::ColsAtCompileTime>
|
||||
struct ei_transform_product_impl;
|
||||
|
||||
/** \geometry_module \ingroup Geometry
|
||||
/** \geometry_module \ingroup GeometryModule
|
||||
*
|
||||
* \class Transform
|
||||
*
|
||||
@@ -202,13 +202,13 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
/** \ingroup Geometry */
|
||||
/** \ingroup GeometryModule */
|
||||
typedef Transform<float,2> Transform2f;
|
||||
/** \ingroup Geometry */
|
||||
/** \ingroup GeometryModule */
|
||||
typedef Transform<float,3> Transform3f;
|
||||
/** \ingroup Geometry */
|
||||
/** \ingroup GeometryModule */
|
||||
typedef Transform<double,2> Transform2d;
|
||||
/** \ingroup Geometry */
|
||||
/** \ingroup GeometryModule */
|
||||
typedef Transform<double,3> Transform3d;
|
||||
|
||||
#ifdef EIGEN_QT_SUPPORT
|
||||
|
||||
Reference in New Issue
Block a user