aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/PaStiXSupport/PaStiXSupport.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-02-28 13:11:39 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-02-28 13:11:39 +0100
commit76d2ca27e51179b67a246a51d9f0396991606ac8 (patch)
tree06258508c08c2af7d27f88507c180eac0ac715e0 /Eigen/src/PaStiXSupport/PaStiXSupport.h
parent41e89c73c755fe70f8babea4a8a3b491057e5c39 (diff)
Fix PaStiX support for Pastix 5.2
Diffstat (limited to 'Eigen/src/PaStiXSupport/PaStiXSupport.h')
-rw-r--r--Eigen/src/PaStiXSupport/PaStiXSupport.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/Eigen/src/PaStiXSupport/PaStiXSupport.h b/Eigen/src/PaStiXSupport/PaStiXSupport.h
index a955287d1..8a546dc2f 100644
--- a/Eigen/src/PaStiXSupport/PaStiXSupport.h
+++ b/Eigen/src/PaStiXSupport/PaStiXSupport.h
@@ -12,6 +12,14 @@
namespace Eigen {
+#if defined(DCOMPLEX)
+ #define PASTIX_COMPLEX COMPLEX
+ #define PASTIX_DCOMPLEX DCOMPLEX
+#else
+ #define PASTIX_COMPLEX std::complex<float>
+ #define PASTIX_DCOMPLEX std::complex<double>
+#endif
+
/** \ingroup PaStiXSupport_Module
* \brief Interface to the PaStix solver
*
@@ -74,14 +82,14 @@ namespace internal
{
if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
if (nbrhs == 0) {x = NULL; nbrhs=1;}
- c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<COMPLEX*>(vals), perm, invp, reinterpret_cast<COMPLEX*>(x), nbrhs, iparm, dparm);
+ c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_COMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_COMPLEX*>(x), nbrhs, iparm, dparm);
}
void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex<double> *vals, int *perm, int * invp, std::complex<double> *x, int nbrhs, int *iparm, double *dparm)
{
if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
if (nbrhs == 0) {x = NULL; nbrhs=1;}
- z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<DCOMPLEX*>(vals), perm, invp, reinterpret_cast<DCOMPLEX*>(x), nbrhs, iparm, dparm);
+ z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_DCOMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_DCOMPLEX*>(x), nbrhs, iparm, dparm);
}
// Convert the matrix to Fortran-style Numbering