diff --git a/Eigen/Sparse b/Eigen/Sparse index 536c28454..6de24d34d 100644 --- a/Eigen/Sparse +++ b/Eigen/Sparse @@ -46,21 +46,21 @@ #ifdef EIGEN_SUPERLU_SUPPORT typedef int int_t; - #include "superlu/slu_Cnames.h" - #include "superlu/supermatrix.h" - #include "superlu/slu_util.h" + #include "slu_Cnames.h" + #include "supermatrix.h" + #include "slu_util.h" namespace SuperLU_S { - #include "superlu/slu_sdefs.h" + #include "slu_sdefs.h" } namespace SuperLU_D { - #include "superlu/slu_ddefs.h" + #include "slu_ddefs.h" } namespace SuperLU_C { - #include "superlu/slu_cdefs.h" + #include "slu_cdefs.h" } namespace SuperLU_Z { - #include "superlu/slu_zdefs.h" + #include "slu_zdefs.h" } namespace Eigen { struct SluMatrix; } #endif diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 1d5e5145e..6d28ebc73 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -152,7 +152,7 @@ template class NestByValue inline int cols() const { return m_expression.cols(); } inline int stride() const { return m_expression.stride(); } - inline const Scalar coeff(int row, int col) const + inline const CoeffReturnType coeff(int row, int col) const { return m_expression.coeff(row, col); } @@ -64,7 +64,7 @@ template class NestByValue return m_expression.const_cast_derived().coeffRef(row, col); } - inline const Scalar coeff(int index) const + inline const CoeffReturnType coeff(int index) const { return m_expression.coeff(index); } diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index 6e3a13f40..edb87d0c3 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -77,21 +77,21 @@ template class Transpose return m_matrix.const_cast_derived().coeffRef(col, row); } - inline const Scalar coeff(int row, int col) const + inline Scalar& coeffRef(int index) + { + return m_matrix.const_cast_derived().coeffRef(index); + } + + inline const CoeffReturnType coeff(int row, int col) const { return m_matrix.coeff(col, row); } - inline const Scalar coeff(int index) const + inline const CoeffReturnType coeff(int index) const { return m_matrix.coeff(index); } - inline Scalar& coeffRef(int index) - { - return m_matrix.const_cast_derived().coeffRef(index); - } - template inline const PacketScalar packet(int row, int col) const { diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 2ffb92d5e..55d0f2649 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -245,6 +245,7 @@ typedef BaseClass Base; \ typedef typename Eigen::ei_traits::Scalar Scalar; \ typedef typename Eigen::NumTraits::Real RealScalar; \ typedef typename Base::PacketScalar PacketScalar; \ +typedef typename Base::CoeffReturnType CoeffReturnType; \ typedef typename Eigen::ei_nested::type Nested; \ enum { RowsAtCompileTime = Eigen::ei_traits::RowsAtCompileTime, \ ColsAtCompileTime = Eigen::ei_traits::ColsAtCompileTime, \ diff --git a/cmake/FindSuperLU.cmake b/cmake/FindSuperLU.cmake index fbefc943a..881e41ef1 100644 --- a/cmake/FindSuperLU.cmake +++ b/cmake/FindSuperLU.cmake @@ -9,10 +9,12 @@ if(BLAS_FOUND) find_path(SUPERLU_INCLUDES NAMES - superlu/supermatrix.h + supermatrix.h PATHS $ENV{SUPERLUDIR} ${INCLUDE_INSTALL_DIR} + PATH_SUFFIXES + superlu ) find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR})