diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-06-06 09:37:59 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-06-06 09:37:59 +0200 |
commit | c58b7598653b35009af5be8a99397f1db99e6dd3 (patch) | |
tree | 4e886a4d36e2e97807263f0961804f43c450dd6d /Eigen/src/SuperLUSupport | |
parent | fc5f21903b7dde8c0681b25d7b1ef5aaf8b60a50 (diff) |
Fix bug #454: allow Block/Map objects for solving with SuperLU
Diffstat (limited to 'Eigen/src/SuperLUSupport')
-rw-r--r-- | Eigen/src/SuperLUSupport/SuperLUSupport.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h index a3ffa4ef2..6c3eb6858 100644 --- a/Eigen/src/SuperLUSupport/SuperLUSupport.h +++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h @@ -161,14 +161,14 @@ struct SluMatrix : SuperMatrix } } - template<typename Scalar, int Rows, int Cols, int Options, int MRows, int MCols> - static SluMatrix Map(Matrix<Scalar,Rows,Cols,Options,MRows,MCols>& mat) + template<typename MatrixType> + static SluMatrix Map(MatrixBase<MatrixType>& _mat) { - typedef Matrix<Scalar,Rows,Cols,Options,MRows,MCols> MatrixType; - eigen_assert( ((Options&RowMajor)!=RowMajor) && "row-major dense matrices is not supported by SuperLU"); + MatrixType& mat(_mat.derived()); + eigen_assert( ((MatrixType::Flags&RowMajorBit)!=RowMajorBit) && "row-major dense matrices are not supported by SuperLU"); SluMatrix res; res.setStorageType(SLU_DN); - res.setScalarType<Scalar>(); + res.setScalarType<typename MatrixType::Scalar>(); res.Mtype = SLU_GE; res.nrow = mat.rows(); |