PaStiXSupport.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_PASTIXSUPPORT_H
11 #define EIGEN_PASTIXSUPPORT_H
12 
13 // IWYU pragma: private
14 #include "./InternalHeaderCheck.h"
15 
16 namespace Eigen {
17 
18 #if defined(DCOMPLEX)
19 #define PASTIX_COMPLEX COMPLEX
20 #define PASTIX_DCOMPLEX DCOMPLEX
21 #else
22 #define PASTIX_COMPLEX std::complex<float>
23 #define PASTIX_DCOMPLEX std::complex<double>
24 #endif
25 
34 template <typename MatrixType_, bool IsStrSym = false>
35 class PastixLU;
36 template <typename MatrixType_, int Options>
37 class PastixLLT;
38 template <typename MatrixType_, int Options>
39 class PastixLDLT;
40 
41 namespace internal {
42 
43 template <class Pastix>
45 
46 template <typename MatrixType_>
47 struct pastix_traits<PastixLU<MatrixType_> > {
48  typedef MatrixType_ MatrixType;
49  typedef typename MatrixType_::Scalar Scalar;
51  typedef typename MatrixType_::StorageIndex StorageIndex;
52 };
53 
54 template <typename MatrixType_, int Options>
55 struct pastix_traits<PastixLLT<MatrixType_, Options> > {
56  typedef MatrixType_ MatrixType;
57  typedef typename MatrixType_::Scalar Scalar;
59  typedef typename MatrixType_::StorageIndex StorageIndex;
60 };
61 
62 template <typename MatrixType_, int Options>
63 struct pastix_traits<PastixLDLT<MatrixType_, Options> > {
64  typedef MatrixType_ MatrixType;
65  typedef typename MatrixType_::Scalar Scalar;
67  typedef typename MatrixType_::StorageIndex StorageIndex;
68 };
69 
70 inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals,
71  int *perm, int *invp, float *x, int nbrhs, int *iparm, double *dparm) {
72  if (n == 0) {
73  ptr = NULL;
74  idx = NULL;
75  vals = NULL;
76  }
77  if (nbrhs == 0) {
78  x = NULL;
79  nbrhs = 1;
80  }
81  s_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm);
82 }
83 
84 inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, double *vals,
85  int *perm, int *invp, double *x, int nbrhs, int *iparm, double *dparm) {
86  if (n == 0) {
87  ptr = NULL;
88  idx = NULL;
89  vals = NULL;
90  }
91  if (nbrhs == 0) {
92  x = NULL;
93  nbrhs = 1;
94  }
95  d_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm);
96 }
97 
98 inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx,
99  std::complex<float> *vals, int *perm, int *invp, std::complex<float> *x, int nbrhs, int *iparm,
100  double *dparm) {
101  if (n == 0) {
102  ptr = NULL;
103  idx = NULL;
104  vals = NULL;
105  }
106  if (nbrhs == 0) {
107  x = NULL;
108  nbrhs = 1;
109  }
110  c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_COMPLEX *>(vals), perm, invp,
111  reinterpret_cast<PASTIX_COMPLEX *>(x), nbrhs, iparm, dparm);
112 }
113 
114 inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx,
115  std::complex<double> *vals, int *perm, int *invp, std::complex<double> *x, int nbrhs,
116  int *iparm, double *dparm) {
117  if (n == 0) {
118  ptr = NULL;
119  idx = NULL;
120  vals = NULL;
121  }
122  if (nbrhs == 0) {
123  x = NULL;
124  nbrhs = 1;
125  }
126  z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_DCOMPLEX *>(vals), perm, invp,
127  reinterpret_cast<PASTIX_DCOMPLEX *>(x), nbrhs, iparm, dparm);
128 }
129 
130 // Convert the matrix to Fortran-style Numbering
131 template <typename MatrixType>
133  if (!(mat.outerIndexPtr()[0])) {
134  int i;
135  for (i = 0; i <= mat.rows(); ++i) ++mat.outerIndexPtr()[i];
136  for (i = 0; i < mat.nonZeros(); ++i) ++mat.innerIndexPtr()[i];
137  }
138 }
139 
140 // Convert to C-style Numbering
141 template <typename MatrixType>
143  // Check the Numbering
144  if (mat.outerIndexPtr()[0] == 1) { // Convert to C-style numbering
145  int i;
146  for (i = 0; i <= mat.rows(); ++i) --mat.outerIndexPtr()[i];
147  for (i = 0; i < mat.nonZeros(); ++i) --mat.innerIndexPtr()[i];
148  }
149 }
150 } // namespace internal
151 
152 // This is the base class to interface with PaStiX functions.
153 // Users should not used this class directly.
154 template <class Derived>
155 class PastixBase : public SparseSolverBase<Derived> {
156  protected:
158  using Base::derived;
159  using Base::m_isInitialized;
160 
161  public:
162  using Base::_solve_impl;
163 
166  typedef typename MatrixType::Scalar Scalar;
168  typedef typename MatrixType::StorageIndex StorageIndex;
171  enum { ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime };
172 
173  public:
175  init();
176  }
177 
179 
180  template <typename Rhs, typename Dest>
182 
189 
194  int &iparm(int idxparam) { return m_iparm(idxparam); }
195 
201 
205  double &dparm(int idxparam) { return m_dparm(idxparam); }
206 
207  inline Index cols() const { return m_size; }
208  inline Index rows() const { return m_size; }
209 
219  eigen_assert(m_isInitialized && "Decomposition is not initialized.");
220  return m_info;
221  }
222 
223  protected:
224  // Initialize the Pastix data structure, check the matrix
225  void init();
226 
227  // Compute the ordering and the symbolic factorization
229 
230  // Compute the numerical factorization
232 
233  // Free all the data allocated by Pastix
234  void clean() {
235  eigen_assert(m_initisOk && "The Pastix structure should be allocated first");
236  m_iparm(IPARM_START_TASK) = API_TASK_CLEAN;
237  m_iparm(IPARM_END_TASK) = API_TASK_CLEAN;
238  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar *)0, m_perm.data(), m_invp.data(), 0, 0,
239  m_iparm.data(), m_dparm.data());
240  }
241 
243 
248  mutable pastix_data_t *m_pastixdata; // Data structure for pastix
249  mutable int m_comm; // The MPI communicator identifier
250  mutable Array<int, IPARM_SIZE, 1> m_iparm; // integer vector for the input parameters
251  mutable Array<double, DPARM_SIZE, 1> m_dparm; // Scalar vector for the input parameters
252  mutable Matrix<StorageIndex, Dynamic, 1> m_perm; // Permutation vector
253  mutable Matrix<StorageIndex, Dynamic, 1> m_invp; // Inverse permutation vector
254  mutable int m_size; // Size of the matrix
255 };
256 
261 template <class Derived>
263  m_size = 0;
264  m_iparm.setZero(IPARM_SIZE);
265  m_dparm.setZero(DPARM_SIZE);
266 
267  m_iparm(IPARM_MODIFY_PARAMETER) = API_NO;
268  pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, 0, 0, 0, 0, 1, m_iparm.data(), m_dparm.data());
269 
270  m_iparm[IPARM_MATRIX_VERIFICATION] = API_NO;
271  m_iparm[IPARM_VERBOSE] = API_VERBOSE_NOT;
272  m_iparm[IPARM_ORDERING] = API_ORDER_SCOTCH;
273  m_iparm[IPARM_INCOMPLETE] = API_NO;
274  m_iparm[IPARM_OOC_LIMIT] = 2000;
275  m_iparm[IPARM_RHS_MAKING] = API_RHS_B;
276  m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;
277 
278  m_iparm(IPARM_START_TASK) = API_TASK_INIT;
279  m_iparm(IPARM_END_TASK) = API_TASK_INIT;
280  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar *)0, 0, 0, 0, 0, m_iparm.data(),
281  m_dparm.data());
282 
283  // Check the returned error
284  if (m_iparm(IPARM_ERROR_NUMBER)) {
285  m_info = InvalidInput;
286  m_initisOk = false;
287  } else {
288  m_info = Success;
289  m_initisOk = true;
290  }
291 }
292 
293 template <class Derived>
295  eigen_assert(mat.rows() == mat.cols() && "The input matrix should be squared");
296 
297  analyzePattern(mat);
298  factorize(mat);
299 
300  m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;
301 }
302 
303 template <class Derived>
305  eigen_assert(m_initisOk && "The initialization of PaSTiX failed");
306 
307  // clean previous calls
308  if (m_size > 0) clean();
309 
310  m_size = internal::convert_index<int>(mat.rows());
311  m_perm.resize(m_size);
312  m_invp.resize(m_size);
313 
314  m_iparm(IPARM_START_TASK) = API_TASK_ORDERING;
315  m_iparm(IPARM_END_TASK) = API_TASK_ANALYSE;
316  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),
317  mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());
318 
319  // Check the returned error
320  if (m_iparm(IPARM_ERROR_NUMBER)) {
321  m_info = NumericalIssue;
322  m_analysisIsOk = false;
323  } else {
324  m_info = Success;
325  m_analysisIsOk = true;
326  }
327 }
328 
329 template <class Derived>
331  // if(&m_cpyMat != &mat) m_cpyMat = mat;
332  eigen_assert(m_analysisIsOk && "The analysis phase should be called before the factorization phase");
333  m_iparm(IPARM_START_TASK) = API_TASK_NUMFACT;
334  m_iparm(IPARM_END_TASK) = API_TASK_NUMFACT;
335  m_size = internal::convert_index<int>(mat.rows());
336 
337  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),
338  mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());
339 
340  // Check the returned error
341  if (m_iparm(IPARM_ERROR_NUMBER)) {
342  m_info = NumericalIssue;
343  m_factorizationIsOk = false;
344  m_isInitialized = false;
345  } else {
346  m_info = Success;
347  m_factorizationIsOk = true;
348  m_isInitialized = true;
349  }
350 }
351 
352 /* Solve the system */
353 template <typename Base>
354 template <typename Rhs, typename Dest>
356  eigen_assert(m_isInitialized && "The matrix should be factorized first");
357  EIGEN_STATIC_ASSERT((Dest::Flags & RowMajorBit) == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
358  int rhs = 1;
359 
360  x = b; /* on return, x is overwritten by the computed solution */
361 
362  for (int i = 0; i < b.cols(); i++) {
363  m_iparm[IPARM_START_TASK] = API_TASK_SOLVE;
364  m_iparm[IPARM_END_TASK] = API_TASK_REFINE;
365 
366  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, internal::convert_index<int>(x.rows()), 0, 0, 0,
367  m_perm.data(), m_invp.data(), &x(0, i), rhs, m_iparm.data(), m_dparm.data());
368  }
369 
370  // Check the returned error
371  m_info = m_iparm(IPARM_ERROR_NUMBER) == 0 ? Success : NumericalIssue;
372 
373  return m_iparm(IPARM_ERROR_NUMBER) == 0;
374 }
375 
397 template <typename MatrixType_, bool IsStrSym>
398 class PastixLU : public PastixBase<PastixLU<MatrixType_> > {
399  public:
402  typedef typename Base::ColSpMatrix ColSpMatrix;
403  typedef typename MatrixType::StorageIndex StorageIndex;
404 
405  public:
406  PastixLU() : Base() { init(); }
407 
408  explicit PastixLU(const MatrixType &matrix) : Base() {
409  init();
410  compute(matrix);
411  }
417  void compute(const MatrixType &matrix) {
418  m_structureIsUptodate = false;
419  ColSpMatrix temp;
420  grabMatrix(matrix, temp);
421  Base::compute(temp);
422  }
429  m_structureIsUptodate = false;
430  ColSpMatrix temp;
431  grabMatrix(matrix, temp);
432  Base::analyzePattern(temp);
433  }
434 
440  void factorize(const MatrixType &matrix) {
441  ColSpMatrix temp;
442  grabMatrix(matrix, temp);
443  Base::factorize(temp);
444  }
445 
446  protected:
447  void init() {
448  m_structureIsUptodate = false;
449  m_iparm(IPARM_SYM) = API_SYM_NO;
450  m_iparm(IPARM_FACTORIZATION) = API_FACT_LU;
451  }
452 
454  if (IsStrSym)
455  out = matrix;
456  else {
457  if (!m_structureIsUptodate) {
458  // update the transposed structure
459  m_transposedStructure = matrix.transpose();
460 
461  // Set the elements of the matrix to zero
462  for (Index j = 0; j < m_transposedStructure.outerSize(); ++j)
463  for (typename ColSpMatrix::InnerIterator it(m_transposedStructure, j); it; ++it) it.valueRef() = 0.0;
464 
465  m_structureIsUptodate = true;
466  }
467 
469  }
471  }
472 
473  using Base::m_dparm;
474  using Base::m_iparm;
475 
478 };
479 
496 template <typename MatrixType_, int UpLo_>
497 class PastixLLT : public PastixBase<PastixLLT<MatrixType_, UpLo_> > {
498  public:
501  typedef typename Base::ColSpMatrix ColSpMatrix;
502 
503  public:
504  enum { UpLo = UpLo_ };
505  PastixLLT() : Base() { init(); }
506 
507  explicit PastixLLT(const MatrixType &matrix) : Base() {
508  init();
509  compute(matrix);
510  }
511 
515  void compute(const MatrixType &matrix) {
516  ColSpMatrix temp;
517  grabMatrix(matrix, temp);
518  Base::compute(temp);
519  }
520 
526  ColSpMatrix temp;
527  grabMatrix(matrix, temp);
528  Base::analyzePattern(temp);
529  }
533  void factorize(const MatrixType &matrix) {
534  ColSpMatrix temp;
535  grabMatrix(matrix, temp);
536  Base::factorize(temp);
537  }
538 
539  protected:
540  using Base::m_iparm;
541 
542  void init() {
543  m_iparm(IPARM_SYM) = API_SYM_YES;
544  m_iparm(IPARM_FACTORIZATION) = API_FACT_LLT;
545  }
546 
548  out.resize(matrix.rows(), matrix.cols());
549  // Pastix supports only lower, column-major matrices
550  out.template selfadjointView<Lower>() = matrix.template selfadjointView<UpLo>();
552  }
553 };
554 
571 template <typename MatrixType_, int UpLo_>
572 class PastixLDLT : public PastixBase<PastixLDLT<MatrixType_, UpLo_> > {
573  public:
576  typedef typename Base::ColSpMatrix ColSpMatrix;
577 
578  public:
579  enum { UpLo = UpLo_ };
580  PastixLDLT() : Base() { init(); }
581 
582  explicit PastixLDLT(const MatrixType &matrix) : Base() {
583  init();
584  compute(matrix);
585  }
586 
590  void compute(const MatrixType &matrix) {
591  ColSpMatrix temp;
592  grabMatrix(matrix, temp);
593  Base::compute(temp);
594  }
595 
601  ColSpMatrix temp;
602  grabMatrix(matrix, temp);
603  Base::analyzePattern(temp);
604  }
608  void factorize(const MatrixType &matrix) {
609  ColSpMatrix temp;
610  grabMatrix(matrix, temp);
611  Base::factorize(temp);
612  }
613 
614  protected:
615  using Base::m_iparm;
616 
617  void init() {
618  m_iparm(IPARM_SYM) = API_SYM_YES;
619  m_iparm(IPARM_FACTORIZATION) = API_FACT_LDLT;
620  }
621 
623  // Pastix supports only lower, column-major matrices
624  out.resize(matrix.rows(), matrix.cols());
625  out.template selfadjointView<Lower>() = matrix.template selfadjointView<UpLo>();
627  }
628 };
629 
630 } // end namespace Eigen
631 
632 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
#define eigen_assert(x)
Definition: Macros.h:910
#define PASTIX_DCOMPLEX
Definition: PaStiXSupport.h:23
#define PASTIX_COMPLEX
Definition: PaStiXSupport.h:22
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
Scalar * b
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:48
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
Definition: PaStiXSupport.h:155
Index rows() const
Definition: PaStiXSupport.h:208
Matrix< StorageIndex, Dynamic, 1 > m_invp
Definition: PaStiXSupport.h:253
@ ColsAtCompileTime
Definition: PaStiXSupport.h:171
@ MaxColsAtCompileTime
Definition: PaStiXSupport.h:171
void analyzePattern(ColSpMatrix &mat)
Definition: PaStiXSupport.h:304
int m_factorizationIsOk
Definition: PaStiXSupport.h:246
internal::pastix_traits< Derived >::MatrixType MatrixType_
Definition: PaStiXSupport.h:164
MatrixType::StorageIndex StorageIndex
Definition: PaStiXSupport.h:168
Array< StorageIndex, IPARM_SIZE, 1 > & iparm()
Definition: PaStiXSupport.h:188
MatrixType::RealScalar RealScalar
Definition: PaStiXSupport.h:167
void compute(ColSpMatrix &mat)
Definition: PaStiXSupport.h:294
ComputationInfo info() const
Reports whether previous computation was successful.
Definition: PaStiXSupport.h:218
Matrix< Scalar, Dynamic, 1 > Vector
Definition: PaStiXSupport.h:169
PastixBase()
Definition: PaStiXSupport.h:174
int & iparm(int idxparam)
Definition: PaStiXSupport.h:194
bool _solve_impl(const MatrixBase< Rhs > &b, MatrixBase< Dest > &x) const
Definition: PaStiXSupport.h:355
Index cols() const
Definition: PaStiXSupport.h:207
double & dparm(int idxparam)
Definition: PaStiXSupport.h:205
Matrix< StorageIndex, Dynamic, 1 > m_perm
Definition: PaStiXSupport.h:252
int m_analysisIsOk
Definition: PaStiXSupport.h:245
MatrixType::Scalar Scalar
Definition: PaStiXSupport.h:166
int m_initisOk
Definition: PaStiXSupport.h:244
void clean()
Definition: PaStiXSupport.h:234
int m_size
Definition: PaStiXSupport.h:254
~PastixBase()
Definition: PaStiXSupport.h:178
Array< int, IPARM_SIZE, 1 > m_iparm
Definition: PaStiXSupport.h:250
bool m_isInitialized
Definition: SparseSolverBase.h:110
void init()
Definition: PaStiXSupport.h:262
MatrixType_ MatrixType
Definition: PaStiXSupport.h:165
void factorize(ColSpMatrix &mat)
Definition: PaStiXSupport.h:330
pastix_data_t * m_pastixdata
Definition: PaStiXSupport.h:248
ComputationInfo m_info
Definition: PaStiXSupport.h:247
SparseMatrix< Scalar, ColMajor > ColSpMatrix
Definition: PaStiXSupport.h:170
Array< double, DPARM_SIZE, 1 > & dparm()
Definition: PaStiXSupport.h:200
Array< double, DPARM_SIZE, 1 > m_dparm
Definition: PaStiXSupport.h:251
int m_comm
Definition: PaStiXSupport.h:249
SparseSolverBase< Derived > Base
Definition: PaStiXSupport.h:157
A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library.
Definition: PaStiXSupport.h:572
@ UpLo
Definition: PaStiXSupport.h:579
Base::ColSpMatrix ColSpMatrix
Definition: PaStiXSupport.h:576
void grabMatrix(const MatrixType &matrix, ColSpMatrix &out)
Definition: PaStiXSupport.h:622
PastixBase< PastixLDLT< MatrixType, UpLo_ > > Base
Definition: PaStiXSupport.h:575
PastixLDLT()
Definition: PaStiXSupport.h:580
PastixLDLT(const MatrixType &matrix)
Definition: PaStiXSupport.h:582
void compute(const MatrixType &matrix)
Definition: PaStiXSupport.h:590
void init()
Definition: PaStiXSupport.h:617
void analyzePattern(const MatrixType &matrix)
Definition: PaStiXSupport.h:600
Array< int, IPARM_SIZE, 1 > m_iparm
Definition: PaStiXSupport.h:250
MatrixType_ MatrixType
Definition: PaStiXSupport.h:574
void factorize(const MatrixType &matrix)
Definition: PaStiXSupport.h:608
A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library.
Definition: PaStiXSupport.h:497
@ UpLo
Definition: PaStiXSupport.h:504
void init()
Definition: PaStiXSupport.h:542
MatrixType_ MatrixType
Definition: PaStiXSupport.h:499
PastixLLT(const MatrixType &matrix)
Definition: PaStiXSupport.h:507
void compute(const MatrixType &matrix)
Definition: PaStiXSupport.h:515
void factorize(const MatrixType &matrix)
Definition: PaStiXSupport.h:533
void analyzePattern(const MatrixType &matrix)
Definition: PaStiXSupport.h:525
PastixBase< PastixLLT< MatrixType, UpLo_ > > Base
Definition: PaStiXSupport.h:500
Array< int, IPARM_SIZE, 1 > m_iparm
Definition: PaStiXSupport.h:250
void grabMatrix(const MatrixType &matrix, ColSpMatrix &out)
Definition: PaStiXSupport.h:547
Base::ColSpMatrix ColSpMatrix
Definition: PaStiXSupport.h:501
PastixLLT()
Definition: PaStiXSupport.h:505
Interface to the PaStix solver.
Definition: PaStiXSupport.h:398
bool m_structureIsUptodate
Definition: PaStiXSupport.h:477
void analyzePattern(const MatrixType &matrix)
Definition: PaStiXSupport.h:428
void factorize(const MatrixType &matrix)
Definition: PaStiXSupport.h:440
void compute(const MatrixType &matrix)
Definition: PaStiXSupport.h:417
void init()
Definition: PaStiXSupport.h:447
PastixLU(const MatrixType &matrix)
Definition: PaStiXSupport.h:408
PastixBase< PastixLU< MatrixType > > Base
Definition: PaStiXSupport.h:401
MatrixType_ MatrixType
Definition: PaStiXSupport.h:400
void grabMatrix(const MatrixType &matrix, ColSpMatrix &out)
Definition: PaStiXSupport.h:453
PastixLU()
Definition: PaStiXSupport.h:406
MatrixType::StorageIndex StorageIndex
Definition: PaStiXSupport.h:403
Array< int, IPARM_SIZE, 1 > m_iparm
Definition: PaStiXSupport.h:250
ColSpMatrix m_transposedStructure
Definition: PaStiXSupport.h:476
Base::ColSpMatrix ColSpMatrix
Definition: PaStiXSupport.h:402
constexpr EIGEN_DEVICE_FUNC const Scalar * data() const
Definition: PlainObjectBase.h:273
Index nonZeros() const
Definition: SparseCompressedBase.h:64
Index cols() const
Definition: SparseMatrix.h:161
Index outerSize() const
Definition: SparseMatrix.h:166
const Scalar * valuePtr() const
Definition: SparseMatrix.h:171
Index rows() const
Definition: SparseMatrix.h:159
Base::InnerIterator InnerIterator
Definition: SparseMatrix.h:138
const StorageIndex * outerIndexPtr() const
Definition: SparseMatrix.h:189
const StorageIndex * innerIndexPtr() const
Definition: SparseMatrix.h:180
A base class for sparse solvers.
Definition: SparseSolverBase.h:67
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Definition: SparseSolverBase.h:104
bool m_isInitialized
Definition: SparseSolverBase.h:110
Derived & derived()
Definition: SparseSolverBase.h:76
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
ComputationInfo
Definition: Constants.h:438
@ NumericalIssue
Definition: Constants.h:442
@ InvalidInput
Definition: Constants.h:447
@ Success
Definition: Constants.h:440
const unsigned int RowMajorBit
Definition: Constants.h:70
void fortran_to_c_numbering(MatrixType &mat)
Definition: PaStiXSupport.h:142
void c_to_fortran_numbering(MatrixType &mat)
Definition: PaStiXSupport.h:132
void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int *invp, float *x, int nbrhs, int *iparm, double *dparm)
Definition: PaStiXSupport.h:70
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
MatrixType_::RealScalar RealScalar
Definition: PaStiXSupport.h:66
MatrixType_::StorageIndex StorageIndex
Definition: PaStiXSupport.h:67
MatrixType_::Scalar Scalar
Definition: PaStiXSupport.h:65
MatrixType_::Scalar Scalar
Definition: PaStiXSupport.h:57
MatrixType_::StorageIndex StorageIndex
Definition: PaStiXSupport.h:59
MatrixType_::RealScalar RealScalar
Definition: PaStiXSupport.h:58
MatrixType_::Scalar Scalar
Definition: PaStiXSupport.h:49
MatrixType_::RealScalar RealScalar
Definition: PaStiXSupport.h:50
MatrixType_::StorageIndex StorageIndex
Definition: PaStiXSupport.h:51
MatrixType_ MatrixType
Definition: PaStiXSupport.h:48
Definition: PaStiXSupport.h:44
std::ofstream out("Result.txt")
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2