mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
remove the Matrix_ prefix
This commit is contained in:
parent
8e888a45d0
commit
2db434265b
@ -40,8 +40,8 @@
|
|||||||
* \param _Cols Number of columns, or \b Dynamic
|
* \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.
|
* 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
|
* \param _Options A combination of either \b RowMajor or \b ColMajor, and of either
|
||||||
* \b Matrix_AutoAlign or \b Matrix_DontAlign.
|
* \b AutoAlign or \b DontAlign.
|
||||||
* The former controls storage order, and defaults to column-major. The latter controls alignment, which is required
|
* 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.
|
* 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").
|
* \param _MaxRows Maximum number of rows. Defaults to \a _Rows (\ref maxrows "note").
|
||||||
@ -133,7 +133,7 @@ class Matrix
|
|||||||
ei_matrix_storage<Scalar, MaxSizeAtCompileTime, RowsAtCompileTime, ColsAtCompileTime, Options> m_storage;
|
ei_matrix_storage<Scalar, MaxSizeAtCompileTime, RowsAtCompileTime, ColsAtCompileTime, Options> m_storage;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum { NeedsToAlign = (Options&Matrix_AutoAlign) == Matrix_AutoAlign
|
enum { NeedsToAlign = (Options&AutoAlign) == AutoAlign
|
||||||
&& SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 };
|
&& SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 };
|
||||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
|
||||||
|
|
||||||
|
@ -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
|
* Static array automatically aligned if the total byte size is a multiple of 16 and the matrix options require auto alignment
|
||||||
*/
|
*/
|
||||||
template <typename T, int Size, int MatrixOptions,
|
template <typename T, int Size, int MatrixOptions,
|
||||||
bool Align = (MatrixOptions&Matrix_AutoAlign) && (((Size*sizeof(T))&0xf)==0)
|
bool Align = (MatrixOptions&AutoAlign) && (((Size*sizeof(T))&0xf)==0)
|
||||||
> struct ei_matrix_array
|
> struct ei_matrix_array
|
||||||
{
|
{
|
||||||
EIGEN_ALIGN_128 T array[Size];
|
EIGEN_ALIGN_128 T array[Size];
|
||||||
|
@ -223,15 +223,13 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Matrix_ColMajor = 0,
|
ColMajor = 0,
|
||||||
Matrix_RowMajor = 0x1, // it is only a coincidence that this is equal to RowMajorBit -- don't rely on that
|
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
|
/** \internal Don't require alignment for the matrix itself (the array of coefficients, if dynamically allocated, may still be
|
||||||
requested to be aligned) */
|
requested to be aligned) */
|
||||||
ColMajor = Matrix_ColMajor, // deprecated
|
DontAlign = 0,
|
||||||
RowMajor = Matrix_RowMajor, // deprecated
|
/** \internal Align the matrix itself if it is vectorizable fixed-size */
|
||||||
Matrix_DontAlign = 0,
|
AutoAlign = 0x2
|
||||||
/** \internal Align the matrix itself */
|
|
||||||
Matrix_AutoAlign = 0x2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -29,7 +29,7 @@ template<typename T> struct ei_traits;
|
|||||||
template<typename T> struct NumTraits;
|
template<typename T> struct NumTraits;
|
||||||
|
|
||||||
template<typename _Scalar, int _Rows, int _Cols,
|
template<typename _Scalar, int _Rows, int _Cols,
|
||||||
int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | Matrix_AutoAlign,
|
int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign,
|
||||||
int _MaxRows = _Rows, int _MaxCols = _Cols> class Matrix;
|
int _MaxRows = _Rows, int _MaxCols = _Cols> class Matrix;
|
||||||
|
|
||||||
template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
|
template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
|
||||||
|
@ -37,9 +37,9 @@
|
|||||||
EIGEN_MINOR_VERSION>=z))))
|
EIGEN_MINOR_VERSION>=z))))
|
||||||
|
|
||||||
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
|
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
|
||||||
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Matrix_RowMajor
|
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION RowMajor
|
||||||
#else
|
#else
|
||||||
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Matrix_ColMajor
|
#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ColMajor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \internal Defines the maximal loop size to enable meta unrolling of loops.
|
/** \internal Defines the maximal loop size to enable meta unrolling of loops.
|
||||||
|
@ -89,11 +89,11 @@ template<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxC
|
|||||||
class ei_compute_matrix_flags
|
class ei_compute_matrix_flags
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
row_major_bit = Options&Matrix_RowMajor ? RowMajorBit : 0,
|
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
|
||||||
inner_max_size = row_major_bit ? MaxCols : MaxRows,
|
inner_max_size = row_major_bit ? MaxCols : MaxRows,
|
||||||
is_big = inner_max_size == Dynamic,
|
is_big = inner_max_size == Dynamic,
|
||||||
is_packet_size_multiple = (Cols*Rows) % ei_packet_traits<Scalar>::size == 0,
|
is_packet_size_multiple = (Cols*Rows) % ei_packet_traits<Scalar>::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<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ template<typename T> struct ei_eval<T,IsDense>
|
|||||||
typedef Matrix<typename ei_traits<T>::Scalar,
|
typedef Matrix<typename ei_traits<T>::Scalar,
|
||||||
ei_traits<T>::RowsAtCompileTime,
|
ei_traits<T>::RowsAtCompileTime,
|
||||||
ei_traits<T>::ColsAtCompileTime,
|
ei_traits<T>::ColsAtCompileTime,
|
||||||
Matrix_AutoAlign | (ei_traits<T>::Flags&RowMajorBit ? Matrix_RowMajor : Matrix_ColMajor),
|
AutoAlign | (ei_traits<T>::Flags&RowMajorBit ? RowMajor : ColMajor),
|
||||||
ei_traits<T>::MaxRowsAtCompileTime,
|
ei_traits<T>::MaxRowsAtCompileTime,
|
||||||
ei_traits<T>::MaxColsAtCompileTime
|
ei_traits<T>::MaxColsAtCompileTime
|
||||||
> type;
|
> type;
|
||||||
@ -138,7 +138,7 @@ template<typename T> struct ei_plain_matrix_type
|
|||||||
typedef Matrix<typename ei_traits<T>::Scalar,
|
typedef Matrix<typename ei_traits<T>::Scalar,
|
||||||
ei_traits<T>::RowsAtCompileTime,
|
ei_traits<T>::RowsAtCompileTime,
|
||||||
ei_traits<T>::ColsAtCompileTime,
|
ei_traits<T>::ColsAtCompileTime,
|
||||||
Matrix_AutoAlign | (ei_traits<T>::Flags&RowMajorBit ? Matrix_RowMajor : Matrix_ColMajor),
|
AutoAlign | (ei_traits<T>::Flags&RowMajorBit ? RowMajor : ColMajor),
|
||||||
ei_traits<T>::MaxRowsAtCompileTime,
|
ei_traits<T>::MaxRowsAtCompileTime,
|
||||||
ei_traits<T>::MaxColsAtCompileTime
|
ei_traits<T>::MaxColsAtCompileTime
|
||||||
> type;
|
> type;
|
||||||
@ -151,7 +151,7 @@ template<typename T> struct ei_plain_matrix_type_column_major
|
|||||||
typedef Matrix<typename ei_traits<T>::Scalar,
|
typedef Matrix<typename ei_traits<T>::Scalar,
|
||||||
ei_traits<T>::RowsAtCompileTime,
|
ei_traits<T>::RowsAtCompileTime,
|
||||||
ei_traits<T>::ColsAtCompileTime,
|
ei_traits<T>::ColsAtCompileTime,
|
||||||
Matrix_AutoAlign | Matrix_ColMajor,
|
AutoAlign | ColMajor,
|
||||||
ei_traits<T>::MaxRowsAtCompileTime,
|
ei_traits<T>::MaxRowsAtCompileTime,
|
||||||
ei_traits<T>::MaxColsAtCompileTime
|
ei_traits<T>::MaxColsAtCompileTime
|
||||||
> type;
|
> type;
|
||||||
|
@ -70,7 +70,7 @@ struct Good8
|
|||||||
|
|
||||||
struct Good9
|
struct Good9
|
||||||
{
|
{
|
||||||
Matrix<float,2,2,Matrix_DontAlign> m; // good: no alignment requested
|
Matrix<float,2,2,DontAlign> m; // good: no alignment requested
|
||||||
float f;
|
float f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user