aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SuperLUSupport/SuperLUSupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/SuperLUSupport/SuperLUSupport.h')
-rw-r--r--Eigen/src/SuperLUSupport/SuperLUSupport.h10
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();