the big memory changes. the most important changes are:

ei_aligned_malloc now really behaves like a malloc
 (untyped, doesn't call ctor)
ei_aligned_new is the typed variant calling ctor
EIGEN_MAKE_ALIGNED_OPERATOR_NEW now takes the class name as parameter
This commit is contained in:
Benoit Jacob
2009-01-08 15:20:21 +00:00
parent e2d2a7d222
commit 1d52bd4cad
21 changed files with 215 additions and 243 deletions

View File

@@ -41,7 +41,7 @@ template <typename _Scalar, int _AmbientDim>
class AlignedBox
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(AlignedBox,_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
enum { AmbientDimAtCompileTime = _AmbientDim };
typedef _Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;

View File

@@ -47,7 +47,7 @@ template <typename _Scalar, int _AmbientDim>
class Hyperplane
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(Hyperplane,_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
enum { AmbientDimAtCompileTime = _AmbientDim };
typedef _Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;

View File

@@ -43,7 +43,7 @@ template <typename _Scalar, int _AmbientDim>
class ParametrizedLine
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_AmbientDim)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(ParametrizedLine,_Scalar,_AmbientDim)
enum { AmbientDimAtCompileTime = _AmbientDim };
typedef _Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;

View File

@@ -65,7 +65,7 @@ class Quaternion : public RotationBase<Quaternion<_Scalar>,3>
Coefficients m_coeffs;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,4)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(Quaternion,_Scalar,4)
using Base::operator*;

View File

@@ -43,7 +43,7 @@ template<typename _Scalar, int _Dim>
class Scaling
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_Dim)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(Scaling,_Scalar,_Dim)
/** dimension of the space */
enum { Dim = _Dim };
/** the scalar type of the coefficients */

View File

@@ -63,7 +63,7 @@ template<typename _Scalar, int _Dim>
class Transform
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1))
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(Transform,_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1))
enum {
Dim = _Dim, ///< space dimension in which the transformation holds
HDim = _Dim+1 ///< size of a respective homogeneous vector
@@ -95,7 +95,9 @@ public:
inline Transform() { }
inline Transform(const Transform& other)
{ m_matrix = other.m_matrix; }
{
m_matrix = other.m_matrix;
}
inline explicit Transform(const TranslationType& t) { *this = t; }
inline explicit Transform(const ScalingType& s) { *this = s; }

View File

@@ -43,7 +43,7 @@ template<typename _Scalar, int _Dim>
class Translation
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(_Scalar,_Dim)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE(Translation,_Scalar,_Dim)
/** dimension of the space */
enum { Dim = _Dim };
/** the scalar type of the coefficients */