From c58b7598653b35009af5be8a99397f1db99e6dd3 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 6 Jun 2012 09:37:59 +0200 Subject: [PATCH] Fix bug #454: allow Block/Map objects for solving with SuperLU --- Eigen/src/SuperLUSupport/SuperLUSupport.h | 10 +++++----- 1 file 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 - static SluMatrix Map(Matrix& mat) + template + static SluMatrix Map(MatrixBase& _mat) { - typedef Matrix 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(); + res.setScalarType(); res.Mtype = SLU_GE; res.nrow = mat.rows();