QUDA  0.9.0
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 #include <vector>
10 #include <algorithm>
11 
12 //#ifdef PRIMME_LIB
13 //#include "primme.h"
14 //#endif
15 
16 #ifdef ARPACK_LIB
17 
18 #define ARPACK(s) s ## _
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #ifdef MULTI_GPU
25 
26 extern int ARPACK(pcnaupd) (int *fcomm, int *ido, char *bmat, int *n, char *which, int *nev, float *tol,
27  std::complex<float> *resid, int *ncv, std::complex<float> *v, int *ldv,
28  int *iparam, int *ipntr, std::complex<float> *workd, std::complex<float> *workl,
29  int *lworkl, float *rwork, int *info);
30 
31 
32 extern int ARPACK(pznaupd) (int *fcomm, int *ido, char *bmat, int *n, char *which, int *nev, double *tol,
33  std::complex<double> *resid, int *ncv, std::complex<double> *v, int *ldv,
34  int *iparam, int *ipntr, std::complex<double> *workd, std::complex<double> *workl,
35  int *lworkl, double *rwork, int *info);
36 
37 
38 extern int ARPACK(pcneupd) (int *fcomm, int *comp_evecs, char *howmany, int *select, std::complex<float> *evals,
39  std::complex<float> *v, int *ldv, std::complex<float> *sigma, std::complex<float> *workev,
40  char *bmat, int *n, char *which, int *nev, float *tol, std::complex<float> *resid,
41  int *ncv, std::complex<float> *v1, int *ldv1, int *iparam, int *ipntr,
42  std::complex<float> *workd, std::complex<float> *workl, int *lworkl, float *rwork, int *info);
43 
44 
45 extern int ARPACK(pzneupd) (int *fcomm, int *comp_evecs, char *howmany, int *select, std::complex<double> *evals,
46  std::complex<double> *v, int *ldv, std::complex<double> *sigma, std::complex<double> *workev,
47  char *bmat, int *n, char *which, int *nev, double *tol, std::complex<double> *resid,
48  int *ncv, std::complex<double> *v1, int *ldv1, int *iparam, int *ipntr,
49  std::complex<double> *workd, std::complex<double> *workl, int *lworkl, double *rwork, int *info);
50 
51 #else
52 
53 extern int ARPACK(cnaupd) (int *ido, char *bmat, int *n, char *which, int *nev, float *tol,
54  std::complex<float> *resid, int *ncv, std::complex<float> *v, int *ldv,
55  int *iparam, int *ipntr, std::complex<float> *workd, std::complex<float> *workl,
56  int *lworkl, float *rwork, int *info);
57 
58 
59 extern int ARPACK(znaupd) (int *ido, char *bmat, int *n, char *which, int *nev, double *tol,
60  std::complex<double> *resid, int *ncv, std::complex<double> *v, int *ldv,
61  int *iparam, int *ipntr, std::complex<double> *workd, std::complex<double> *workl,
62  int *lworkl, double *rwork, int *info);
63 
64 
65 extern int ARPACK(cneupd) (int *comp_evecs, char *howmany, int *select, std::complex<float> *evals,
66  std::complex<float> *v, int *ldv, std::complex<float> *sigma, std::complex<float> *workev,
67  char *bmat, int *n, char *which, int *nev, float *tol, std::complex<float> *resid,
68  int *ncv, std::complex<float> *v1, int *ldv1, int *iparam, int *ipntr,
69  std::complex<float> *workd, std::complex<float> *workl, int *lworkl, float *rwork, int *info);
70 
71 
72 extern int ARPACK(zneupd) (int *comp_evecs, char *howmany, int *select, std::complex<double> *evals,
73  std::complex<double> *v, int *ldv, std::complex<double> *sigma, std::complex<double> *workev,
74  char *bmat, int *n, char *which, int *nev, double *tol, std::complex<double> *resid,
75  int *ncv, std::complex<double> *v1, int *ldv1, int *iparam, int *ipntr,
76  std::complex<double> *workd, std::complex<double> *workl, int *lworkl, double *rwork, int *info);
77 
78 #endif
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif //ARPACK_LIB
85 
86 namespace quda{
87 
111  void arpackSolve( std::vector<ColorSpinorField*> &B, void *evals, DiracMatrix &matEigen, QudaPrecision matPrec, QudaPrecision arpackPrec, double tol, int nev, int ncv, char *target );
112 // void primmeSolve( std::vector<ColorSpinorField*> &B, void *evals, DiracMatrix &matEigen, QudaPrecision matPrec, QudaPrecision primmePrec, double tol, int nev, int ncv, char *target);
113 
114 }//endof namespace quda
115 
enum QudaPrecision_s QudaPrecision
void arpackSolve(std::vector< ColorSpinorField *> &B, void *evals, DiracMatrix &matEigen, QudaPrecision matPrec, QudaPrecision arpackPrec, double tol, int nev, int ncv, char *target)
double tol
Definition: test_util.cpp:1647
int nev
Definition: test_util.cpp:1669