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();