SparseLU does not accept row-major matrices for the destination.

This commit is contained in:
Gael Guennebaud 2013-02-22 14:45:42 +01:00
parent bd8c9c69e4
commit e71bc79f2a
2 changed files with 12 additions and 0 deletions

View File

@ -140,6 +140,8 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ
}
/** \returns the solution X of \f$ A X = B \f$ using the current decomposition of A.
*
* \warning the destination matrix X in X = this->solve(B) must be colmun-major.
*
* \sa compute()
*/

View File

@ -21,6 +21,16 @@
// You should have received a copy of the GNU Lesser General Public
// License and a copy of the GNU General Public License along with
// Eigen. If not, see <http://www.gnu.org/licenses/>.
// SparseLU solve does not accept column major matrices for the destination.
// However, as expected, the generic check_sparse_square_solving routines produces row-major
// rhs and destination matrices when compiled with EIGEN_DEFAULT_TO_ROW_MAJOR
//
#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
#undef EIGEN_DEFAULT_TO_ROW_MAJOR
#endif
#include "sparse_solver.h"
#include <Eigen/SparseLU>
#include <unsupported/Eigen/SparseExtra>