Eigen  5.0.1-dev
 
Loading...
Searching...
No Matches
SuperLUSupport
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// This Source Code Form is subject to the terms of the Mozilla
5// Public License v. 2.0. If a copy of the MPL was not distributed
6// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H
9#define EIGEN_SUPERLUSUPPORT_MODULE_H
10
11#include "SparseCore"
12
13#include "src/Core/util/DisableStupidWarnings.h"
14
15#ifdef EMPTY
16#define EIGEN_EMPTY_WAS_ALREADY_DEFINED
17#endif
18
19typedef int int_t;
20#include <slu_Cnames.h>
21#include <supermatrix.h>
22#include <slu_util.h>
23
24// slu_util.h defines a preprocessor token named EMPTY which is really polluting,
25// so we remove it in favor of a SUPERLU_EMPTY token.
26// If EMPTY was already defined then we don't undef it.
27
28#if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED)
29#undef EIGEN_EMPTY_WAS_ALREADY_DEFINED
30#elif defined(EMPTY)
31#undef EMPTY
32#endif
33
34#define SUPERLU_EMPTY (-1)
35
36namespace Eigen {
37struct SluMatrix;
38}
39
40/** \ingroup Support_modules
41 * \defgroup SuperLUSupport_Module SuperLUSupport module
42 *
43 * This module provides an interface to the <a href="http://crd-legacy.lbl.gov/~xiaoye/SuperLU/">SuperLU</a> library.
44 * It provides the following factorization class:
45 * - class SuperLU: a supernodal sequential LU factorization.
46 * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative
47 * methods).
48 *
49 * \warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported.
50 *
51 * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined
52 * because it is too polluting.
53 *
54 * \code
55 * #include <Eigen/SuperLUSupport>
56 * \endcode
57 *
58 * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be
59 * linked to the superlu library and its dependencies. The dependencies depend on how superlu has been compiled. For a
60 * cmake based project, you can use our FindSuperLU.cmake module to help you in this task.
61 *
62 */
63
64// IWYU pragma: begin_exports
65#include "src/SuperLUSupport/SuperLUSupport.h"
66// IWYU pragma: end_exports
67
68#include "src/Core/util/ReenableStupidWarnings.h"
69
70#endif // EIGEN_SUPERLUSUPPORT_MODULE_H