From 53fa8517245e0136c83b77526b05ce67de232a56 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 12 Nov 2011 14:11:27 +0100 Subject: move sparse solvers from unsupported/ to main Eigen/ and remove the "not stable yet" warning --- Eigen/SuperLUSupport | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Eigen/SuperLUSupport (limited to 'Eigen/SuperLUSupport') diff --git a/Eigen/SuperLUSupport b/Eigen/SuperLUSupport new file mode 100644 index 000000000..291ecebf0 --- /dev/null +++ b/Eigen/SuperLUSupport @@ -0,0 +1,53 @@ +#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H +#define EIGEN_SUPERLUSUPPORT_MODULE_H + +#include "SparseCore" + +#include "../../Eigen/src/Core/util/DisableStupidWarnings.h" + +#ifdef EMPTY +#define EIGEN_EMPTY_WAS_ALREADY_DEFINED +#endif + +typedef int int_t; +#include +#include +#include + +// slu_util.h defines a preprocessor token named EMPTY which is really polluting, +// so we remove it in favor of a SUPERLU_EMPTY token. +// If EMPTY was already, defined then we don't undef it. + +#if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) +# undef EIGEN_EMPTY_WAS_ALREADY_DEFINED +#elif defined(EMPTY) +# undef EMPTY +#endif + +#define SUPERLU_EMPTY (-1) + +namespace Eigen { struct SluMatrix; } + +namespace Eigen { + +/** \ingroup Sparse_modules + * \defgroup SuperLUSupport_Module SuperLUSupport module + * + * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. + * + * \code + * #include + * \endcode + */ + +#include "src/misc/Solve.h" +#include "src/misc/SparseSolve.h" + +#include "src/SuperLUSupport/SuperLUSupport.h" + + +} // namespace Eigen + +#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_SUPERLUSUPPORT_MODULE_H -- cgit v1.2.3