diff options
Diffstat (limited to 'Eigen/src/SuperLUSupport/SuperLUSupport.h')
-rw-r--r-- | Eigen/src/SuperLUSupport/SuperLUSupport.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h index 50a69f306..d1d3ad7f1 100644 --- a/Eigen/src/SuperLUSupport/SuperLUSupport.h +++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h @@ -217,12 +217,12 @@ struct SluMatrix : SuperMatrix res.setScalarType<typename MatrixType::Scalar>(); // FIXME the following is not very accurate - if (MatrixType::Flags & Upper) + if (int(MatrixType::Flags) & int(Upper)) res.Mtype = SLU_TRU; - if (MatrixType::Flags & Lower) + if (int(MatrixType::Flags) & int(Lower)) res.Mtype = SLU_TRL; - eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU"); + eigen_assert(((int(MatrixType::Flags) & int(SelfAdjoint))==0) && "SelfAdjoint matrix shape not supported by SuperLU"); return res; } @@ -297,8 +297,8 @@ SluMatrix asSluMatrix(MatrixType& mat) template<typename Scalar, int Flags, typename Index> MappedSparseMatrix<Scalar,Flags,Index> map_superlu(SluMatrix& sluMat) { - eigen_assert((Flags&RowMajor)==RowMajor && sluMat.Stype == SLU_NR - || (Flags&ColMajor)==ColMajor && sluMat.Stype == SLU_NC); + eigen_assert(((Flags&RowMajor)==RowMajor && sluMat.Stype == SLU_NR) + || ((Flags&ColMajor)==ColMajor && sluMat.Stype == SLU_NC)); Index outerSize = (Flags&RowMajor)==RowMajor ? sluMat.ncol : sluMat.nrow; @@ -352,7 +352,7 @@ class SuperLUBase : public SparseSolverBase<Derived> /** \brief Reports whether previous computation was successful. * - * \returns \c Success if computation was succesful, + * \returns \c Success if computation was successful, * \c NumericalIssue if the matrix.appears to be negative. */ ComputationInfo info() const @@ -650,9 +650,8 @@ void SuperLU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> { eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()"); - const Index size = m_matrix.rows(); const Index rhsCols = b.cols(); - eigen_assert(size==b.rows()); + eigen_assert(m_matrix.rows()==b.rows()); m_sluOptions.Trans = NOTRANS; m_sluOptions.Fact = FACTORED; @@ -974,9 +973,8 @@ void SuperILU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest { eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()"); - const int size = m_matrix.rows(); const int rhsCols = b.cols(); - eigen_assert(size==b.rows()); + eigen_assert(m_matrix.rows()==b.rows()); m_sluOptions.Trans = NOTRANS; m_sluOptions.Fact = FACTORED; |