diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-12-22 17:37:11 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-12-22 17:37:11 +0100 |
commit | e182e9c6166840b8db44e0be459a2e26d26fda0f (patch) | |
tree | 4947fcce42a9cc79f5a9f7bce28e79b36b7a3ce2 /Eigen/src/Core | |
parent | af4d8c5cecf1a1595dc601f2220ff3a8fd8d2957 (diff) |
extend the DenseStorageMatrix mechanism to all expressions
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/DenseStorageBase.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/Diagonal.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/DiagonalProduct.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/Minor.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/ProductBase.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/Transpose.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/products/GeneralUnrolled.h | 1 |
7 files changed, 8 insertions, 9 deletions
diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h index b9257156e..ed116d708 100644 --- a/Eigen/src/Core/DenseStorageBase.h +++ b/Eigen/src/Core/DenseStorageBase.h @@ -546,7 +546,7 @@ struct ei_conservative_resize_like_impl EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(OtherDerived) - typename DenseBase<Derived>::PlainMatrixType tmp(other); + typename Derived::PlainMatrixType tmp(other); const int common_rows = std::min(tmp.rows(), _this.rows()); const int common_cols = std::min(tmp.cols(), _this.cols()); tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols); @@ -562,7 +562,7 @@ struct ei_conservative_resize_like_impl<Derived,OtherDerived,true> if (_this.rows() == other.rows() && _this.cols() == other.cols()) return; // segment(...) will check whether Derived/OtherDerived are vectors! - typename DenseBase<Derived>::PlainMatrixType tmp(other); + typename Derived::PlainMatrixType tmp(other); const int common_size = std::min<int>(_this.size(),tmp.size()); tmp.segment(0,common_size) = _this.segment(0,common_size); _this.derived().swap(tmp); diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 25aa9cd4c..344dbca40 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -44,9 +44,8 @@ */ template<typename MatrixType, int Index> struct ei_traits<Diagonal<MatrixType,Index> > + : ei_traits<MatrixType> { - typedef typename MatrixType::Scalar Scalar; - typedef typename ei_traits<MatrixType>::StorageType StorageType; typedef typename ei_nested<MatrixType>::type MatrixTypeNested; typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested; enum { diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index 42e2e948d..87068d9ba 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -28,9 +28,9 @@ template<typename MatrixType, typename DiagonalType, int ProductOrder> struct ei_traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> > + : ei_traits<MatrixType> { typedef typename ei_scalar_product_traits<typename MatrixType::Scalar, typename DiagonalType::Scalar>::ReturnType Scalar; - typedef typename ei_traits<MatrixType>::StorageType StorageType; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, diff --git a/Eigen/src/Core/Minor.h b/Eigen/src/Core/Minor.h index 1db60b002..3ed0fec6b 100644 --- a/Eigen/src/Core/Minor.h +++ b/Eigen/src/Core/Minor.h @@ -40,9 +40,8 @@ */ template<typename MatrixType> struct ei_traits<Minor<MatrixType> > + : ei_traits<MatrixType> { - typedef typename MatrixType::Scalar Scalar; - typedef typename ei_traits<MatrixType>::StorageType StorageType; typedef typename ei_nested<MatrixType>::type MatrixTypeNested; typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested; enum { diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 2df864458..d835f16b7 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -29,7 +29,7 @@ * */ template<typename Derived, typename _Lhs, typename _Rhs> -struct ei_traits<ProductBase<Derived,_Lhs,_Rhs> > +struct ei_traits<ProductBase<Derived,_Lhs,_Rhs> > : ei_traits<typename ei_cleantype<_Lhs>::type> { typedef typename ei_cleantype<_Lhs>::type Lhs; typedef typename ei_cleantype<_Rhs>::type Rhs; diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index b202f62c4..513ce522a 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -38,7 +38,7 @@ * \sa MatrixBase::transpose(), MatrixBase::adjoint() */ template<typename MatrixType> -struct ei_traits<Transpose<MatrixType> > +struct ei_traits<Transpose<MatrixType> > : ei_traits<MatrixType> { typedef typename MatrixType::Scalar Scalar; typedef typename ei_nested<MatrixType>::type MatrixTypeNested; diff --git a/Eigen/src/Core/products/GeneralUnrolled.h b/Eigen/src/Core/products/GeneralUnrolled.h index 72a61354e..7e2eebf08 100644 --- a/Eigen/src/Core/products/GeneralUnrolled.h +++ b/Eigen/src/Core/products/GeneralUnrolled.h @@ -45,6 +45,7 @@ struct ei_product_packet_impl; template<typename LhsNested, typename RhsNested> struct ei_traits<GeneralProduct<LhsNested,RhsNested,UnrolledProduct> > { + typedef DenseStorageMatrix DenseStorageType; typedef typename ei_cleantype<LhsNested>::type _LhsNested; typedef typename ei_cleantype<RhsNested>::type _RhsNested; typedef typename ei_scalar_product_traits<typename _LhsNested::Scalar, typename _RhsNested::Scalar>::ReturnType Scalar; |