QUDA  v1.1.0
A library for QCD on GPUs
quda_arpack_interface.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <complex>
5 #include <stdio.h>
6 
7 #include <color_spinor_field.h>
8 #include <dirac_quda.h>
9 
10 #ifdef ARPACK_LIB
11 
12 #define ARPACK(s) s ## _
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
26 #if (defined(QMP_COMMS) || defined(MPI_COMMS))
27 
28 // Parallel, single prec complex eigenvectors
29 extern int ARPACK(pcnaupd)(int *fcomm, int *ido, char *bmat, int *n, char *spectrum, int *nev, float *tol,
30  std::complex<float> *resid, int *ncv, std::complex<float> *v, int *ldv, int *iparam,
31  int *ipntr, std::complex<float> *workd, std::complex<float> *workl, int *lworkl,
32  float *rwork, int *info, int bmat_size, int spectrum_size);
33 
34 // Parallel, double prec complex eigenvectors
35 extern int ARPACK(pznaupd)(int *fcomm, int *ido, char *bmat, int *n, char *spectrum, int *nev, double *tol,
36  std::complex<double> *resid, int *ncv, std::complex<double> *v, int *ldv, int *iparam,
37  int *ipntr, std::complex<double> *workd, std::complex<double> *workl, int *lworkl,
38  double *rwork, int *info, int bmat_size, int spectrum_size);
39 
40 // Parallel, single prec complex eigenvalues
41 extern int ARPACK(pcneupd)(int *fcomm, int *comp_evecs, char *howmany, int *select, std::complex<float> *evals,
42  std::complex<float> *v, int *ldv, std::complex<float> *sigma, std::complex<float> *workev,
43  char *bmat, int *n, char *which, int *nev, float *tol, std::complex<float> *resid, int *ncv,
44  std::complex<float> *v1, int *ldv1, int *iparam, int *ipntr, std::complex<float> *workd,
45  std::complex<float> *workl, int *lworkl, float *rwork, int *info, int howmany_size,
46  int bmat_size, int spectrum_size);
47 
48 // Parallel, double prec complex eigenvalues
49 extern int ARPACK(pzneupd)(int *fcomm, int *comp_evecs, char *howmany, int *select, std::complex<double> *evals,
50  std::complex<double> *v, int *ldv, std::complex<double> *sigma, std::complex<double> *workev,
51  char *bmat, int *n, char *which, int *nev, double *tol, std::complex<double> *resid,
52  int *ncv, std::complex<double> *v1, int *ldv1, int *iparam, int *ipntr,
53  std::complex<double> *workd, std::complex<double> *workl, int *lworkl, double *rwork,
54  int *info, int howmany_size, int bmat_size, int spectrum_size);
55 
56 extern int ARPACK(pmcinitdebug)(int *, int *, int *, int *, int *, int *, int *, int *);
57 
58 #else
59 
60 // Serial, single prec complex eigenvectors
61 extern int ARPACK(cnaupd)(int *ido, char *bmat, int *n, char *which, int *nev, float *tol, std::complex<float> *resid,
62  int *ncv, std::complex<float> *v, int *ldv, int *iparam, int *ipntr,
63  std::complex<float> *workd, std::complex<float> *workl, int *lworkl, float *rwork, int *info,
64  int bmat_size, int spectrum_size);
65 
66 // Serial, double prec complex eigenvectors
67 extern int ARPACK(znaupd)(int *ido, char *bmat, int *n, char *which, int *nev, double *tol, std::complex<double> *resid,
68  int *ncv, std::complex<double> *v, int *ldv, int *iparam, int *ipntr,
69  std::complex<double> *workd, std::complex<double> *workl, int *lworkl, double *rwork,
70  int *info, int bmat_size, int spectrum_size);
71 
72 // Serial, single prec complex eigenvalues
73 extern int ARPACK(cneupd)(int *comp_evecs, char *howmany, int *select, std::complex<float> *evals,
74  std::complex<float> *v, int *ldv, std::complex<float> *sigma, std::complex<float> *workev,
75  char *bmat, int *n, char *which, int *nev, float *tol, std::complex<float> *resid, int *ncv,
76  std::complex<float> *v1, int *ldv1, int *iparam, int *ipntr, std::complex<float> *workd,
77  std::complex<float> *workl, int *lworkl, float *rwork, int *info, int howmany_size,
78  int bmat_size, int spectrum_size);
79 
80 // Serial, double prec complex eigenvalues
81 extern int ARPACK(zneupd)(int *comp_evecs, char *howmany, int *select, std::complex<double> *evals,
82  std::complex<double> *v, int *ldv, std::complex<double> *sigma, std::complex<double> *workev,
83  char *bmat, int *n, char *which, int *nev, double *tol, std::complex<double> *resid, int *ncv,
84  std::complex<double> *v1, int *ldv1, int *iparam, int *ipntr, std::complex<double> *workd,
85  std::complex<double> *workl, int *lworkl, double *rwork, int *info, int howmany_size,
86  int bmat_size, int spectrum_size);
87 
88 extern int ARPACK(mcinitdebug)(int *, int *, int *, int *, int *, int *, int *, int *);
89 
90 #endif
91 
92 // ARPACK initlog and finilog routines for printing the ARPACK log
93 #ifdef ARPACK_LOGGING
94 extern int ARPACK(initlog)(int *, char *, int);
95 extern int ARPACK(finilog)(int *);
96 #endif
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif //ARPACK_LIB
double tol