mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-20 03:44:26 +08:00
Fix API incompatibility for ILU in superLU support
This commit is contained in:
parent
cedf1f4c17
commit
d7fa5ebe0e
@ -65,6 +65,24 @@ DECL_GSSVX(z, double, std::complex<double>)
|
||||
#ifdef EIGEN_SUPERLU_HAS_ILU
|
||||
|
||||
// similarly for the incomplete factorization using gsisx
|
||||
#if defined(SUPERLU_MAJOR_VERSION) && (SUPERLU_MAJOR_VERSION >= 5)
|
||||
#define DECL_GSISX(PREFIX, FLOATTYPE, KEYTYPE) \
|
||||
extern "C" { \
|
||||
extern void PREFIX##gsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, FLOATTYPE *, FLOATTYPE *, \
|
||||
SuperMatrix *, SuperMatrix *, void *, int, SuperMatrix *, SuperMatrix *, FLOATTYPE *, \
|
||||
FLOATTYPE *, GlobalLU_t *, mem_usage_t *, SuperLUStat_t *, int *); \
|
||||
} \
|
||||
inline float SuperLU_gsisx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r, int *etree, \
|
||||
char *equed, FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L, SuperMatrix *U, void *work, \
|
||||
int lwork, SuperMatrix *B, SuperMatrix *X, FLOATTYPE *recip_pivot_growth, \
|
||||
FLOATTYPE *rcond, SuperLUStat_t *stats, int *info, KEYTYPE) { \
|
||||
mem_usage_t mem_usage; \
|
||||
GlobalLU_t gLU; \
|
||||
PREFIX##gsisx(options, A, perm_c, perm_r, etree, equed, R, C, L, U, work, lwork, B, X, recip_pivot_growth, rcond, \
|
||||
&gLU, &mem_usage, stats, info); \
|
||||
return mem_usage.for_lu; /* bytes used by the factor storage */ \
|
||||
}
|
||||
#else // version < 5.0
|
||||
#define DECL_GSISX(PREFIX, FLOATTYPE, KEYTYPE) \
|
||||
extern "C" { \
|
||||
extern void PREFIX##gsisx(superlu_options_t *, SuperMatrix *, int *, int *, int *, char *, FLOATTYPE *, FLOATTYPE *, \
|
||||
@ -80,6 +98,7 @@ DECL_GSSVX(z, double, std::complex<double>)
|
||||
&mem_usage, stats, info); \
|
||||
return mem_usage.for_lu; /* bytes used by the factor storage */ \
|
||||
}
|
||||
#endif
|
||||
|
||||
DECL_GSISX(s, float, float)
|
||||
DECL_GSISX(c, float, std::complex<float>)
|
||||
|
Loading…
x
Reference in New Issue
Block a user