ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
lapack_connector.h
Go to the documentation of this file.
1
22#ifndef LAPACK_CONNECTOR_HPP
23#define LAPACK_CONNECTOR_HPP
24
25#include <new>
26#include <stdexcept>
27#include <iostream>
28#include <cassert>
29#include "../matrix.h"
30#include "../complexmatrix.h"
31#include "../global_function.h"
32
33#include <limits>
34// =========================================================
35// Tolerances for LAPACK/ScaLAPACK eigenvalue routines
36// =========================================================
37// Huawei KML strictly validates input parameters.
38// It rejects abstol=0 and orfac=-1, which are standard
39// defaults in open-source LAPACK to trigger internal logic.
40// We must explicitly pass the mathematically equivalent defaults.
41#ifdef __KML
42 constexpr double LAPACK_ABSTOL = 2*std::numeric_limits<double>::min(); // 2*PDLAMCH('S')
43 constexpr double LAPACK_ORFAC = 2.0e-12; // Default value
44#else
45 constexpr double LAPACK_ABSTOL = 0.0;
46 constexpr double LAPACK_ORFAC = -1.0;
47#endif
48// =========================================================
49
50//Naming convention of lapack subroutines : ammxxx, where
51//"a" specifies the data type:
52// - s stands for float
53// - d stands for double
54// - c stands for complex float
55// - z stands for complex double
56//"mm" specifies the type of matrix, for example:
57// - he stands for hermitian
58// - sy stands for symmetric
59//"xxx" specifies the type of problem, for example:
60// - gv stands for generalized eigenvalue
61
62// The following declarations cover only a subset of LAPACK routines.
63// If you need a LAPACK function that is not included here, feel free to add its declaration as needed.
64extern "C"
65{
66// === Generalized Hermitian-definite eigenproblems ===
67void dsygvd_(const int* itype, const char* jobz, const char* uplo, const int* n,
68 double* a, const int* lda,
69 double* b, const int* ldb,
70 double* w,
71 double* work, const int* lwork,
72 int* iwork, const int* liwork,
73 int* info);
74
75void chegvd_(const int* itype, const char* jobz, const char* uplo, const int* n,
76 std::complex<float>* a, const int* lda,
77 std::complex<float>* b, const int* ldb,
78 float* w,
79 std::complex<float>* work, const int* lwork,
80 float* rwork, const int* lrwork,
81 int* iwork, const int* liwork,
82 int* info);
83
84void zhegvd_(const int* itype, const char* jobz, const char* uplo, const int* n,
85 std::complex<double>* a, const int* lda,
86 std::complex<double>* b, const int* ldb,
87 double* w,
88 std::complex<double>* work, const int* lwork,
89 double* rwork, const int* lrwork,
90 int* iwork, const int* liwork,
91 int* info);
92
93// === Selected eigenvalues/vectors: standard Hermitian ===
94
95void dsyevx_(const char* jobz, const char* range, const char* uplo, const int* n,
96 double* a, const int* lda,
97 const double* vl, const double* vu,
98 const int* il, const int* iu,
99 const double* abstol,
100 int* m, double* w, double* z, const int* ldz,
101 double* work, const int* lwork,
102 int* iwork, int* ifail,
103 int* info);
104
105void cheevx_(const char* jobz, const char* range, const char* uplo, const int* n,
106 std::complex<float>* a, const int* lda,
107 const float* vl, const float* vu,
108 const int* il, const int* iu,
109 const float* abstol,
110 int* m, float* w, std::complex<float>* z, const int* ldz,
111 std::complex<float>* work, const int* lwork,
112 float* rwork, int* iwork, int* ifail,
113 int* info);
114
115void zheevx_(const char* jobz, const char* range, const char* uplo, const int* n,
116 std::complex<double>* a, const int* lda,
117 const double* vl, const double* vu,
118 const int* il, const int* iu,
119 const double* abstol,
120 int* m, double* w, std::complex<double>* z, const int* ldz,
121 std::complex<double>* work, const int* lwork,
122 double* rwork, int* iwork, int* ifail,
123 int* info);
124
125// === Selected eigenvalues/vectors: generalized Hermitian ===
126
127void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo,
128 const int* n,
129 double* a, const int* lda,
130 double* b, const int* ldb,
131 const double* vl, const double* vu,
132 const int* il, const int* iu,
133 const double* abstol,
134 int* m, double* w, double* z, const int* ldz,
135 double* work, const int* lwork,
136 int* iwork, int* ifail,
137 int* info);
138
139void chegvx_(const int* itype, const char* jobz, const char* range, const char* uplo,
140 const int* n,
141 std::complex<float>* a, const int* lda,
142 std::complex<float>* b, const int* ldb,
143 const float* vl, const float* vu,
144 const int* il, const int* iu,
145 const float* abstol,
146 int* m, float* w, std::complex<float>* z, const int* ldz,
147 std::complex<float>* work, const int* lwork,
148 float* rwork, int* iwork, int* ifail,
149 int* info);
150
151void zhegvx_(const int* itype, const char* jobz, const char* range, const char* uplo,
152 const int* n,
153 std::complex<double>* a, const int* lda,
154 std::complex<double>* b, const int* ldb,
155 const double* vl, const double* vu,
156 const int* il, const int* iu,
157 const double* abstol,
158 int* m, double* w, std::complex<double>* z, const int* ldz,
159 std::complex<double>* work, const int* lwork,
160 double* rwork, int* iwork, int* ifail,
161 int* info);
162
163// === Generalized Hermitian: all eigenvalues (simple driver) ===
164
165void dsygv_(const int* itype, const char* jobz, const char* uplo, const int* n,
166 double* a, const int* lda,
167 double* b, const int* ldb,
168 double* w,
169 double* work, const int* lwork,
170 int* info);
171
172void chegv_(const int* itype, const char* jobz, const char* uplo, const int* n,
173 std::complex<float>* a, const int* lda,
174 std::complex<float>* b, const int* ldb,
175 float* w,
176 std::complex<float>* work, const int* lwork,
177 float* rwork,
178 int* info);
179
180void zhegv_(const int* itype, const char* jobz, const char* uplo, const int* n,
181 std::complex<double>* a, const int* lda,
182 std::complex<double>* b, const int* ldb,
183 double* w,
184 std::complex<double>* work, const int* lwork,
185 double* rwork,
186 int* info);
187
188// === Standard Hermitian eigenproblem ===
189
190 void ssyev_(const char* jobz,
191 const char* uplo,
192 const int* n,
193 float* a,
194 const int* lda,
195 float* w,
196 float* work,
197 const int* lwork,
198 int* info);
199 void dsyev_(const char* jobz,
200 const char* uplo,
201 const int* n,
202 double* a,
203 const int* lda,
204 double* w,
205 double* work,
206 const int* lwork,
207 int* info);
208
209void cheev_(const char* jobz, const char* uplo, const int* n,
210 std::complex<float>* a, const int* lda,
211 float* w,
212 std::complex<float>* work, const int* lwork,
213 float* rwork,
214 int* info);
215
216void zheev_(const char* jobz, const char* uplo, const int* n,
217 std::complex<double>* a, const int* lda,
218 double* w,
219 std::complex<double>* work, const int* lwork,
220 double* rwork,
221 int* info);
222
223// === General (non-Hermitian) eigenproblem ===
224
225void dgeev_(const char* jobvl, const char* jobvr, const int* n,
226 double* a, const int* lda,
227 double* wr, double* wi,
228 double* vl, const int* ldvl,
229 double* vr, const int* ldvr,
230 double* work, const int* lwork,
231 int* info);
232
233void zgeev_(const char* jobvl, const char* jobvr, const int* n,
234 std::complex<double>* a, const int* lda,
235 std::complex<double>* w,
236 std::complex<double>* vl, const int* ldvl,
237 std::complex<double>* vr, const int* ldvr,
238 std::complex<double>* work, const int* lwork,
239 double* rwork,
240 int* info);
241
242// === Matrix inversion (LU) ===
243
244void dgetrf_(const int* m, const int* n, double* a, const int* lda,
245 int* ipiv, int* info);
246
247void dgetri_(const int* n, double* a, const int* lda,
248 const int* ipiv,
249 double* work, const int* lwork,
250 int* info);
251
252// === Symmetric indefinite inversion (Bunch-Kaufman) ===
253
254void dsytrf_(const char* uplo, const int* n, double* a, const int* lda,
255 int* ipiv, double* work, const int* lwork, int* info);
256
257void dsytri_(const char* uplo, const int* n, double* a, const int* lda,
258 const int* ipiv, double* work, int* info);
259
260// === Cholesky factorization & inversion ===
261
262void spotrf_(const char* uplo, const int* n, float* a, const int* lda, int* info);
263void dpotrf_(const char* uplo, const int* n, double* a, const int* lda, int* info);
264void cpotrf_(const char* uplo, const int* n, std::complex<float>* a, const int* lda, int* info);
265void zpotrf_(const char* uplo, const int* n, std::complex<double>* a, const int* lda, int* info);
266
267void spotri_(const char* uplo, const int* n, float* a, const int* lda, int* info);
268void dpotri_(const char* uplo, const int* n, double* a, const int* lda, int* info);
269void cpotri_(const char* uplo, const int* n, std::complex<float>* a, const int* lda, int* info);
270void zpotri_(const char* uplo, const int* n, std::complex<double>* a, const int* lda, int* info);
271
272// === Complex LU inversion ===
273
274void zgetrf_(const int* m, const int* n, std::complex<double>* a, const int* lda,
275 int* ipiv, int* info);
276
277void zgetri_(const int* n, std::complex<double>* a, const int* lda,
278 const int* ipiv,
279 std::complex<double>* work, const int* lwork,
280 int* info);
281
282
283// === Tridiagonal eigen solvers ===
284
285void dsterf_(const int* n, double* d, double* e, int* info);
286
287void dstein_(const int* n, const double* d, const double* e,
288 const int* m, const double* w,
289 const int* iblock, const int* isplit,
290 double* z, const int* ldz,
291 double* work, int* iwork, int* ifail,
292 int* info);
293
294void zstein_(const int* n, const double* d, const double* e,
295 const int* m, const double* w,
296 const int* iblock, const int* isplit,
297 std::complex<double>* z, const int* ldz,
298 double* work, int* iwork, int* ifail,
299 int* info);
300
301// === Unblocked Cholesky (level 2 BLAS) ===
302
303void dpotf2_(const char* uplo, const int* n, double* a, const int* lda, int* info);
304void zpotf2_(const char* uplo, const int* n, std::complex<double>* a, const int* lda, int* info);
305
306// === Tridiagonal solver ===
307
308void dgtsv_(const int* n, const int* nrhs,
309 double* dl, double* d, double* du,
310 double* b, const int* ldb,
311 int* info);
312
313// === Symmetric indefinite linear solver ===
314
315void dsysv_(const char* uplo, const int* n, const int* nrhs,
316 double* a, const int* lda,
317 int* ipiv,
318 double* b, const int* ldb,
319 double* work, const int* lwork,
320 int* info);
321} // extern "C"
322
323#ifdef GATHER_INFO
324#define zhegvx_ zhegvx_i
325void zhegvx_i(const int* itype,
326 const char* jobz,
327 const char* range,
328 const char* uplo,
329 const int* n,
330 std::complex<double>* a,
331 const int* lda,
332 std::complex<double>* b,
333 const int* ldb,
334 const double* vl,
335 const double* vu,
336 const int* il,
337 const int* iu,
338 const double* abstol,
339 int* m,
340 double* w,
341 std::complex<double>* z,
342 const int* ldz,
343 std::complex<double>* work,
344 const int* lwork,
345 double* rwork,
346 int* iwork,
347 int* ifail,
348 int* info);
349#endif // GATHER_INFO
350
351// Class LapackConnector provide the connector to fortran lapack routine.
352// The entire function in this class are static and inline function.
353// Usage example: LapackConnector::functionname(parameter list).
355{
356 // Transpose the std::complex matrix to the fortran-form real-std::complex array.
357 static inline
358 std::complex<double>* transpose(const ModuleBase::ComplexMatrix& a, const int n, const int lda)
359 {
360 std::complex<double>* aux = new std::complex<double>[lda*n];
361 for (int i = 0; i < n; ++i)
362 {
363 for (int j = 0; j < lda; ++j)
364 {
365 aux[i*lda+j] = a(j,i); // aux[i*lda+j] means aux[i][j] in semantic, not in syntax!
366 }
367 }
368 return aux;
369 }
370
371 static inline
372 std::complex<float>* transpose(const std::complex<float>* a, const int n, const int lda, const int nbase_x)
373 {
374 std::complex<float>* aux = new std::complex<float>[lda*n];
375 for (int i = 0; i < n; ++i)
376 {
377 for (int j = 0; j < lda; ++j)
378 {
379 aux[j * n + i] = a[i * nbase_x + j];
380 }
381 }
382 return aux;
383 }
384
385 static inline
386 std::complex<double>* transpose(const std::complex<double>* a, const int n, const int lda, const int nbase_x)
387 {
388 std::complex<double>* aux = new std::complex<double>[lda*n];
389 for (int i = 0; i < n; ++i)
390 {
391 for (int j = 0; j < lda; ++j)
392 {
393 aux[j * n + i] = a[i * nbase_x + j];
394 }
395 }
396 return aux;
397 }
398
399 // Transpose the fortran-form real-std::complex array to the std::complex matrix.
400 static inline
401 void transpose(const std::complex<double>* aux, ModuleBase::ComplexMatrix& a, const int n, const int lda)
402 {
403 for (int i = 0; i < n; ++i)
404 {
405 for (int j = 0; j < lda; ++j)
406 {
407 a(j, i) = aux[i*lda+j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax!
408 }
409 }
410 }
411
412 // Transpose the fortran-form real-std::complex array to the std::complex matrix.
413 static inline
414 void transpose(const std::complex<float>* aux, std::complex<float>* a, const int n, const int lda, const int nbase_x)
415 {
416 for (int i = 0; i < n; ++i)
417 {
418 for (int j = 0; j < lda; ++j)
419 {
420 a[j * nbase_x + i] = aux[i * lda + j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax!
421 }
422 }
423 }
424
425 // Transpose the fortran-form real-std::complex array to the std::complex matrix.
426 static inline
427 void transpose(const std::complex<double>* aux, std::complex<double>* a, const int n, const int lda, const int nbase_x)
428 {
429 for (int i = 0; i < n; ++i)
430 {
431 for (int j = 0; j < lda; ++j)
432 {
433 a[j * nbase_x + i] = aux[i * lda + j]; // aux[i*lda+j] means aux[i][j] in semantic, not in syntax!
434 }
435 }
436 }
437
438 // Peize Lin add 2015-12-27
439 static inline
440 char change_uplo(const char &uplo)
441 {
442 switch(uplo)
443 {
444 case 'U': return 'L';
445 case 'L': return 'U';
446 default: throw std::invalid_argument("uplo must be 'U' or 'L'");
447 }
448 }
449
450 // Peize Lin add 2019-04-14
451 static inline
452 char change_trans_NC(const char &trans)
453 {
454 switch(trans)
455 {
456 case 'N': return 'C';
457 case 'C': return 'N';
458 default: throw std::invalid_argument("trans must be 'N' or 'C'");
459 }
460 }
461
462 // wrap function of fortran lapack routine zheev.
463 static inline
464 void zheev( const char jobz,
465 const char uplo,
466 const int n,
468 const int lda,
469 double* w,
470 std::complex< double >* work,
471 const int lwork,
472 double* rwork,
473 int *info )
474 { // Transpose the std::complex matrix to the fortran-form real-std::complex array.
475 std::complex<double> *aux = LapackConnector::transpose(a, n, lda);
476 // call the fortran routine
477 zheev_(&jobz, &uplo, &n, aux, &lda, w, work, &lwork, rwork, info);
478 // Transpose the fortran-form real-std::complex array to the std::complex matrix.
479 LapackConnector::transpose(aux, a, n, lda);
480 // free the memory.
481 delete[] aux;
482 }
483
484 static inline
485 void zgetrf(int m, int n, ModuleBase::ComplexMatrix &a, const int lda, int *ipiv, int *info)
486 {
487 std::complex<double> *aux = LapackConnector::transpose(a, n, lda);
488 zgetrf_( &m, &n, aux, &lda, ipiv, info);
489 LapackConnector::transpose(aux, a, n, lda);
490 delete[] aux;
491 return;
492 }
493 static inline
494 void zgetri(int n, ModuleBase::ComplexMatrix &a, int lda, int *ipiv, std::complex<double> * work, int lwork, int *info)
495 {
496 std::complex<double> *aux = LapackConnector::transpose(a, n, lda);
497 zgetri_( &n, aux, &lda, ipiv, work, &lwork, info);
498 LapackConnector::transpose(aux, a, n, lda);
499 delete[] aux;
500 return;
501 }
502
503 // Peize Lin add 2016-07-09
504 static inline
505 void potrf( const char &uplo, const int &n, float*const A, const int &lda, int &info )
506 {
507 const char uplo_changed = change_uplo(uplo);
508 spotrf_( &uplo_changed, &n, A, &lda, &info );
509 }
510 static inline
511 void potrf( const char &uplo, const int &n, double*const A, const int &lda, int &info )
512 {
513 const char uplo_changed = change_uplo(uplo);
514 dpotrf_( &uplo_changed, &n, A, &lda, &info );
515 }
516 static inline
517 void potrf( const char &uplo, const int &n, std::complex<float>*const A, const int &lda, int &info )
518 {
519 const char uplo_changed = change_uplo(uplo);
520 cpotrf_( &uplo_changed, &n, A, &lda, &info );
521 }
522 static inline
523 void potrf( const char &uplo, const int &n, std::complex<double>*const A, const int &lda, int &info )
524 {
525 const char uplo_changed = change_uplo(uplo);
526 zpotrf_( &uplo_changed, &n, A, &lda, &info );
527 }
528
529
530 // Peize Lin add 2016-07-09
531 static inline
532 void potri( const char &uplo, const int &n, float*const A, const int &lda, int &info )
533 {
534 const char uplo_changed = change_uplo(uplo);
535 spotri_( &uplo_changed, &n, A, &lda, &info);
536 }
537 static inline
538 void potri( const char &uplo, const int &n, double*const A, const int &lda, int &info )
539 {
540 const char uplo_changed = change_uplo(uplo);
541 dpotri_( &uplo_changed, &n, A, &lda, &info);
542 }
543 static inline
544 void potri( const char &uplo, const int &n, std::complex<float>*const A, const int &lda, int &info )
545 {
546 const char uplo_changed = change_uplo(uplo);
547 cpotri_( &uplo_changed, &n, A, &lda, &info);
548 }
549 static inline
550 void potri( const char &uplo, const int &n, std::complex<double>*const A, const int &lda, int &info )
551 {
552 const char uplo_changed = change_uplo(uplo);
553 zpotri_( &uplo_changed, &n, A, &lda, &info);
554 }
555
556 // Peize Lin add 2016-07-09
557 static inline
558 void potrf( const char &uplo, const int &n, ModuleBase::matrix &A, const int &lda, int &info )
559 {
560 potrf( uplo, n, A.c, lda, info );
561 }
562 static inline
563 void potrf( const char &uplo, const int &n, ModuleBase::ComplexMatrix &A, const int &lda, int &info )
564 {
565 potrf( uplo, n, A.c, lda, info );
566 }
567
568 // Peize Lin add 2016-07-09
569 static inline
570 void potri( const char &uplo, const int &n, ModuleBase::matrix &A, const int &lda, int &info )
571 {
572 potri( uplo, n, A.c, lda, info);
573 }
574 static inline
575 void potri( const char &uplo, const int &n, ModuleBase::ComplexMatrix &A, const int &lda, int &info )
576 {
577 potri( uplo, n, A.c, lda, info);
578 }
579
580 // Peize Lin add 2019-04-14
581 // if trans=='N': C = a * A * A.H + b * C
582 // if trans=='C': C = a * A.H * A + b * C
583 static inline
584 void herk(const char uplo, const char trans, const int n, const int k,
585 const double alpha, const std::complex<double> *A, const int lda,
586 const double beta, std::complex<double> *C, const int ldc)
587 {
588 const char uplo_changed = change_uplo(uplo);
589 const char trans_changed = change_trans_NC(trans);
590 zherk_(&uplo_changed, &trans_changed, &n, &k, &alpha, A, &lda, &beta, C, &ldc);
591 }
592 static inline
593 void herk(const char uplo, const char trans, const int n, const int k,
594 const float alpha, const std::complex<float>* A, const int lda,
595 const float beta, std::complex<float>* C, const int ldc)
596 {
597 const char uplo_changed = change_uplo(uplo);
598 const char trans_changed = change_trans_NC(trans);
599 cherk_(&uplo_changed, &trans_changed, &n, &k, &alpha, A, &lda, &beta, C, &ldc);
600 }
601} // namespace LapackConnector
602#endif // LAPACK_CONNECTOR_HPP
void spotri_(const char *uplo, const int *n, float *A, const int *lda, int *info)
void zgetrf_(const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
void cpotrf_(const char *uplo, const int *n, std::complex< float > *A, const int *lda, int *info)
void spotrf_(const char *uplo, const int *n, float *A, const int *lda, int *info)
void cpotri_(const char *uplo, const int *n, std::complex< float > *A, const int *lda, int *info)
void zpotri_(const char *uplo, const int *n, std::complex< double > *A, const int *lda, int *info)
void zpotrf_(const char *uplo, const int *n, std::complex< double > *A, const int *lda, int *info)
void dpotrf_(const char *uplo, const int *n, double *A, const int *lda, int *info)
void dpotri_(const char *uplo, const int *n, double *A, const int *lda, int *info)
void zgetri_(const int *n, std::complex< double > *A, const int *lda, const int *ipiv, std::complex< double > *work, const int *lwork, int *info)
void cherk_(const char *uplo, const char *trans, const int *n, const int *k, const float *alpha, const std::complex< float > *a, const int *lda, const float *beta, std::complex< float > *c, const int *ldc)
void zherk_(const char *uplo, const char *trans, const int *n, const int *k, const double *alpha, const std::complex< double > *a, const int *lda, const double *beta, std::complex< double > *c, const int *ldc)
const std::complex< double > i
Definition cal_pLpR.cpp:46
Definition complexmatrix.h:13
Definition matrix.h:18
void zhegvx_i(const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, std::complex< double > *z, const int *ldz, std::complex< double > *work, const int *lwork, double *rwork, int *iwork, int *ifail, int *info)
Definition gather_math_lib_info.cpp:49
constexpr double LAPACK_ABSTOL
Definition lapack_connector.h:45
void chegvx_(const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, std::complex< float > *z, const int *ldz, std::complex< float > *work, const int *lwork, float *rwork, int *iwork, int *ifail, int *info)
void dgetrf_(const int *m, const int *n, double *a, const int *lda, int *ipiv, int *info)
void dsyevx_(const char *jobz, const char *range, const char *uplo, const int *n, double *a, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info)
void chegv_(const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, float *w, std::complex< float > *work, const int *lwork, float *rwork, int *info)
void cheevx_(const char *jobz, const char *range, const char *uplo, const int *n, std::complex< float > *a, const int *lda, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, std::complex< float > *z, const int *ldz, std::complex< float > *work, const int *lwork, float *rwork, int *iwork, int *ifail, int *info)
void spotrf_(const char *uplo, const int *n, float *a, const int *lda, int *info)
void dgtsv_(const int *n, const int *nrhs, double *dl, double *d, double *du, double *b, const int *ldb, int *info)
void dsygvd_(const int *itype, const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, double *w, double *work, const int *lwork, int *iwork, const int *liwork, int *info)
void dgetri_(const int *n, double *a, const int *lda, const int *ipiv, double *work, const int *lwork, int *info)
void zpotrf_(const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
void dsygv_(const int *itype, const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, double *w, double *work, const int *lwork, int *info)
void dpotrf_(const char *uplo, const int *n, double *a, const int *lda, int *info)
void zgetri_(const int *n, std::complex< double > *a, const int *lda, const int *ipiv, std::complex< double > *work, const int *lwork, int *info)
void dsterf_(const int *n, double *d, double *e, int *info)
void dsysv_(const char *uplo, const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, double *work, const int *lwork, int *info)
void zgetrf_(const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
void zhegvd_(const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, double *w, std::complex< double > *work, const int *lwork, double *rwork, const int *lrwork, int *iwork, const int *liwork, int *info)
void zhegv_(const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, double *w, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void zheev_(const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, double *w, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void dsytri_(const char *uplo, const int *n, double *a, const int *lda, const int *ipiv, double *work, int *info)
void cheev_(const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, float *w, std::complex< float > *work, const int *lwork, float *rwork, int *info)
void zheevx_(const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *a, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, std::complex< double > *z, const int *ldz, std::complex< double > *work, const int *lwork, double *rwork, int *iwork, int *ifail, int *info)
void zpotri_(const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
constexpr double LAPACK_ORFAC
Definition lapack_connector.h:46
void zhegvx_(const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, std::complex< double > *z, const int *ldz, std::complex< double > *work, const int *lwork, double *rwork, int *iwork, int *ifail, int *info)
void dsygvx_(const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info)
void zgeev_(const char *jobvl, const char *jobvr, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *w, std::complex< double > *vl, const int *ldvl, std::complex< double > *vr, const int *ldvr, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void zstein_(const int *n, const double *d, const double *e, const int *m, const double *w, const int *iblock, const int *isplit, std::complex< double > *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
void dsytrf_(const char *uplo, const int *n, double *a, const int *lda, int *ipiv, double *work, const int *lwork, int *info)
void dstein_(const int *n, const double *d, const double *e, const int *m, const double *w, const int *iblock, const int *isplit, double *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
void dpotf2_(const char *uplo, const int *n, double *a, const int *lda, int *info)
void zpotf2_(const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
void chegvd_(const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, float *w, std::complex< float > *work, const int *lwork, float *rwork, const int *lrwork, int *iwork, const int *liwork, int *info)
void dpotri_(const char *uplo, const int *n, double *a, const int *lda, int *info)
void dsyev_(const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *w, double *work, const int *lwork, int *info)
void dgeev_(const char *jobvl, const char *jobvr, const int *n, double *a, const int *lda, double *wr, double *wi, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
void spotri_(const char *uplo, const int *n, float *a, const int *lda, int *info)
void ssyev_(const char *jobz, const char *uplo, const int *n, float *a, const int *lda, float *w, float *work, const int *lwork, int *info)
void cpotri_(const char *uplo, const int *n, std::complex< float > *a, const int *lda, int *info)
void cpotrf_(const char *uplo, const int *n, std::complex< float > *a, const int *lda, int *info)
Definition lapack_connector.h:355