aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/SuperLUSupport
blob: 532cec8ce5cb3e1bd5057638be47491b0f07b858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H
#define EIGEN_SUPERLUSUPPORT_MODULE_H

#include "SparseExtra"

#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"

#ifdef EMPTY
#define EIGEN_EMPTY_WAS_ALREADY_DEFINED
#endif

typedef int int_t;
#include <slu_Cnames.h>
#include <supermatrix.h>
#include <slu_util.h>

// 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 Unsupported_modules
  * \defgroup SuperLUSupport_Module Super LU support
  *
  * \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 <Eigen/SuperLUSupport>
  * \endcode
  */

#include "src/SparseExtra/SuperLUSupport.h"

struct SuperLULegacy {};
#include "src/SparseExtra/SuperLUSupportLegacy.h"

} // namespace Eigen

#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"

#endif // EIGEN_SUPERLUSUPPORT_MODULE_H