From 2db434265bd37e66f6fa2dc81a06897e630cae41 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 6 Jan 2009 18:07:16 +0000 Subject: [PATCH] remove the Matrix_ prefix --- Eigen/src/Core/Matrix.h | 6 +++--- Eigen/src/Core/MatrixStorage.h | 2 +- Eigen/src/Core/util/Constants.h | 12 +++++------- Eigen/src/Core/util/ForwardDeclarations.h | 2 +- Eigen/src/Core/util/Macros.h | 4 ++-- Eigen/src/Core/util/XprHelper.h | 10 +++++----- test/unalignedassert.cpp | 2 +- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 666d25cd9..d16cae031 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -40,8 +40,8 @@ * \param _Cols Number of columns, or \b Dynamic * * The remaining template parameters are optional -- in most cases you don't have to worry about them. - * \param _Options A combination of either \b Matrix_RowMajor or \b Matrix_ColMajor, and of either - * \b Matrix_AutoAlign or \b Matrix_DontAlign. + * \param _Options A combination of either \b RowMajor or \b ColMajor, and of either + * \b AutoAlign or \b DontAlign. * The former controls storage order, and defaults to column-major. The latter controls alignment, which is required * for vectorization. It defaults to aligning matrices except for fixed sizes that aren't a multiple of the packet size. * \param _MaxRows Maximum number of rows. Defaults to \a _Rows (\ref maxrows "note"). @@ -133,7 +133,7 @@ class Matrix ei_matrix_storage m_storage; public: - enum { NeedsToAlign = (Options&Matrix_AutoAlign) == Matrix_AutoAlign + enum { NeedsToAlign = (Options&AutoAlign) == AutoAlign && SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 }; EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign) diff --git a/Eigen/src/Core/MatrixStorage.h b/Eigen/src/Core/MatrixStorage.h index fdf5449b7..98f948aae 100644 --- a/Eigen/src/Core/MatrixStorage.h +++ b/Eigen/src/Core/MatrixStorage.h @@ -30,7 +30,7 @@ * Static array automatically aligned if the total byte size is a multiple of 16 and the matrix options require auto alignment */ template struct ei_matrix_array { EIGEN_ALIGN_128 T array[Size]; diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index a535e2417..10e50f43b 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -223,15 +223,13 @@ enum { }; enum { - Matrix_ColMajor = 0, - Matrix_RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that + ColMajor = 0, + RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that /** \internal Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be requested to be aligned) */ - ColMajor = Matrix_ColMajor, // deprecated - RowMajor = Matrix_RowMajor, // deprecated - Matrix_DontAlign = 0, - /** \internal Align the matrix itself */ - Matrix_AutoAlign = 0x2 + DontAlign = 0, + /** \internal Align the matrix itself if it is vectorizable fixed-size */ + AutoAlign = 0x2 }; enum { diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index bb4567ad0..c194882d1 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -29,7 +29,7 @@ template struct ei_traits; template struct NumTraits; template class Matrix; template class Flagged; diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index af473ca32..844b8831b 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -37,9 +37,9 @@ EIGEN_MINOR_VERSION>=z)))) #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR -#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Matrix_RowMajor +#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION RowMajor #else -#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Matrix_ColMajor +#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ColMajor #endif /** \internal Defines the maximal loop size to enable meta unrolling of loops. diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 739eb1108..12d6f9a3a 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -89,11 +89,11 @@ template::size == 0, - aligned_bit = ((Options&Matrix_AutoAlign) && (is_big || is_packet_size_multiple)) ? AlignedBit : 0, + aligned_bit = ((Options&AutoAlign) && (is_big || is_packet_size_multiple)) ? AlignedBit : 0, packet_access_bit = ei_packet_traits::size > 1 && aligned_bit ? PacketAccessBit : 0 }; @@ -117,7 +117,7 @@ template struct ei_eval typedef Matrix::Scalar, ei_traits::RowsAtCompileTime, ei_traits::ColsAtCompileTime, - Matrix_AutoAlign | (ei_traits::Flags&RowMajorBit ? Matrix_RowMajor : Matrix_ColMajor), + AutoAlign | (ei_traits::Flags&RowMajorBit ? RowMajor : ColMajor), ei_traits::MaxRowsAtCompileTime, ei_traits::MaxColsAtCompileTime > type; @@ -138,7 +138,7 @@ template struct ei_plain_matrix_type typedef Matrix::Scalar, ei_traits::RowsAtCompileTime, ei_traits::ColsAtCompileTime, - Matrix_AutoAlign | (ei_traits::Flags&RowMajorBit ? Matrix_RowMajor : Matrix_ColMajor), + AutoAlign | (ei_traits::Flags&RowMajorBit ? RowMajor : ColMajor), ei_traits::MaxRowsAtCompileTime, ei_traits::MaxColsAtCompileTime > type; @@ -151,7 +151,7 @@ template struct ei_plain_matrix_type_column_major typedef Matrix::Scalar, ei_traits::RowsAtCompileTime, ei_traits::ColsAtCompileTime, - Matrix_AutoAlign | Matrix_ColMajor, + AutoAlign | ColMajor, ei_traits::MaxRowsAtCompileTime, ei_traits::MaxColsAtCompileTime > type; diff --git a/test/unalignedassert.cpp b/test/unalignedassert.cpp index 2d0b5a015..7b6e3535d 100644 --- a/test/unalignedassert.cpp +++ b/test/unalignedassert.cpp @@ -70,7 +70,7 @@ struct Good8 struct Good9 { - Matrix m; // good: no alignment requested + Matrix m; // good: no alignment requested float f; };