aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Sparse/SparseUtil.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-11-17 16:04:19 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-11-17 16:04:19 +0100
commit1e62e0b0d823078aa2d9b8ed2c93f7bc889df177 (patch)
treebaf0ebffcfc15fc56e293494c24d417a4807b74c /Eigen/src/Sparse/SparseUtil.h
parent63bcc1c0fbd03042715caf40aa090385c8fe0043 (diff)
more ET refactoring:
* extend Cwise for multiple storage base class * a lot of cleaning in the Sparse module
Diffstat (limited to 'Eigen/src/Sparse/SparseUtil.h')
-rw-r--r--Eigen/src/Sparse/SparseUtil.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/Eigen/src/Sparse/SparseUtil.h b/Eigen/src/Sparse/SparseUtil.h
index d3a9862a2..b99be580c 100644
--- a/Eigen/src/Sparse/SparseUtil.h
+++ b/Eigen/src/Sparse/SparseUtil.h
@@ -82,7 +82,8 @@ enum { RowsAtCompileTime = Eigen::ei_traits<Derived>::RowsAtCompileTime, \
CoeffReadCost = Eigen::ei_traits<Derived>::CoeffReadCost, \
SizeAtCompileTime = Base::SizeAtCompileTime, \
IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \
- using Base::derived;
+ using Base::derived; \
+ using Base::const_cast_derived;
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \
_EIGEN_SPARSE_PUBLIC_INTERFACE(Derived, Eigen::SparseMatrixBase<Derived>)
@@ -129,7 +130,10 @@ template<typename ExpressionType,
template<typename ExpressionType, int Mode> class SparseTriangular;
template<typename Lhs, typename Rhs> class SparseDiagonalProduct;
-template<typename Lhs, typename Rhs> struct ei_sparse_product_mode;
+template<typename Lhs, typename Rhs,
+ typename LhsStorage = typename ei_traits<Lhs>::StorageType,
+ typename RhsStorage = typename ei_traits<Rhs>::StorageType> struct ei_sparse_product_mode;
+
template<typename Lhs, typename Rhs, int ProductMode = ei_sparse_product_mode<Lhs,Rhs>::value> struct SparseProductReturnType;
const int CoherentAccessPattern = 0x1;
@@ -137,18 +141,7 @@ const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern;
const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern;
const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern;
-// const int AccessPatternNotSupported = 0x0;
-// const int AccessPatternSupported = 0x1;
-//
-// template<typename MatrixType, int AccessPattern> struct ei_support_access_pattern
-// {
-// enum { ret = (int(ei_traits<MatrixType>::SupportedAccessPatterns) & AccessPattern) == AccessPattern
-// ? AccessPatternSupported
-// : AccessPatternNotSupported
-// };
-// };
-
-template<typename T> class ei_eval<T,IsSparse>
+template<typename T> class ei_eval<T,Sparse>
{
typedef typename ei_traits<T>::Scalar _Scalar;
enum {