mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* make the _Flags template parameter of Matrix default to the corrected
flags. This ensures that unless explicitly messed up otherwise, a Matrix type is equal to its own Eval type. This seriously reduces the number of types instantiated. Measured +13% compile speed, -7% binary size. * Improve doc of Matrix template parameters.
This commit is contained in:
@@ -28,10 +28,18 @@
|
||||
template<typename T> struct ei_traits;
|
||||
template<typename Lhs, typename Rhs> struct ei_product_eval_mode;
|
||||
template<typename T> struct NumTraits;
|
||||
template<typename Scalar, int Size, unsigned int SuggestedFlags> class ei_corrected_matrix_flags;
|
||||
|
||||
template<int _Rows, int _Cols> struct ei_size_at_compile_time;
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols,
|
||||
unsigned int _SuggestedFlags = EIGEN_DEFAULT_MATRIX_FLAGS,
|
||||
int _MaxRows = _Rows, int _MaxCols = _Cols>
|
||||
int _MaxRows = _Rows, int _MaxCols = _Cols,
|
||||
unsigned int _Flags = ei_corrected_matrix_flags<
|
||||
_Scalar,
|
||||
ei_size_at_compile_time<_MaxRows,_MaxCols>::ret,
|
||||
EIGEN_DEFAULT_MATRIX_FLAGS
|
||||
>::ret
|
||||
>
|
||||
class Matrix;
|
||||
|
||||
template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
|
||||
|
||||
@@ -180,9 +180,14 @@ template<typename T> class ei_eval
|
||||
typedef Matrix<_Scalar,
|
||||
ei_traits<T>::RowsAtCompileTime,
|
||||
ei_traits<T>::ColsAtCompileTime,
|
||||
ei_corrected_matrix_flags<_Scalar, ei_size_at_compile_time<_MaxRows,_MaxCols>::ret, _Flags>::ret,
|
||||
ei_traits<T>::MaxRowsAtCompileTime,
|
||||
ei_traits<T>::MaxColsAtCompileTime> type;
|
||||
ei_traits<T>::MaxColsAtCompileTime,
|
||||
ei_corrected_matrix_flags<
|
||||
_Scalar,
|
||||
ei_size_at_compile_time<_MaxRows,_MaxCols>::ret,
|
||||
_Flags
|
||||
>::ret
|
||||
> type;
|
||||
};
|
||||
|
||||
template<typename T> struct ei_unref { typedef T type; };
|
||||
|
||||
Reference in New Issue
Block a user