Arpack.h
Go to the documentation of this file.
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2013-2015 Imperial College London
5  * Copyright 2013-2015 Andreas Schuh
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 /**
21  * \file mirtk/Arpack.h
22  * \brief Interface to ARPACK FORTRAN routines.
23  *
24  * \attention Include this header in internal files such as .cc translation units only!
25  */
26 
27 #ifndef MIRTK_Arpack_H
28 #define MIRTK_Arpack_H
29 
30 
31 #ifndef ARPACK_F77NAME
32 # define ARPACK_F77NAME(x) x##_
33 #endif
34 
35 extern "C"
36 {
37 
38 
39 // ----------------------------------------------------------------------------
40 // debug "common" statement
41 
42 struct {
43  int logfil, ndigit, mgetv0;
44  int msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd;
45  int mnaupd, mnaup2, mnaitr, mneigt, mnapps, mngets, mneupd;
46  int mcaupd, mcaup2, mcaitr, mceigt, mcapps, mcgets, mceupd;
47 } ARPACK_F77NAME(debug);
48 
49 // -----------------------------------------------------------------------------
50 // double precision symmetric routines
51 
52 void ARPACK_F77NAME(dsaupd)(int *ido, char *bmat, int *n, char *which,
53  int *nev, double *tol, double *resid,
54  int *ncv, double *V, int *ldv,
55  int *iparam, int *ipntr, double *workd,
56  double *workl, int *lworkl, int *info);
57 
58 void ARPACK_F77NAME(dseupd)(int *rvec, char *HowMny, int *select,
59  double *d, double *Z, int *ldz,
60  double *sigma, char *bmat, int *n,
61  char *which, int *nev, double *tol,
62  double *resid, int *ncv, double *V,
63  int *ldv, int *iparam, int *ipntr,
64  double *workd, double *workl,
65  int *lworkl, int *info);
66 
67 // -----------------------------------------------------------------------------
68 // double precision nonsymmetric routines
69 
70 void ARPACK_F77NAME(dnaupd)(int *ido, char *bmat, int *n, char *which,
71  int *nev, double *tol, double *resid,
72  int *ncv, double *V, int *ldv,
73  int *iparam, int *ipntr, double *workd,
74  double *workl, int *lworkl, int *info);
75 
76 void ARPACK_F77NAME(dneupd)(int *rvec, char *HowMny, int *select,
77  double *dr, double *di, double *Z,
78  int *ldz, double *sigmar,
79  double *sigmai, double *workev,
80  char *bmat, int *n, char *which,
81  int *nev, double *tol, double *resid,
82  int *ncv, double *V, int *ldv,
83  int *iparam, int *ipntr,
84  double *workd, double *workl,
85  int *lworkl, int *info);
86 
87 // -----------------------------------------------------------------------------
88 // single precision symmetric routines
89 
90 void ARPACK_F77NAME(ssaupd)(int *ido, char *bmat, int *n, char *which,
91  int *nev, float *tol, float *resid,
92  int *ncv, float *V, int *ldv,
93  int *iparam, int *ipntr, float *workd,
94  float *workl, int *lworkl, int *info);
95 
96 void ARPACK_F77NAME(sseupd)(int *rvec, char *HowMny, int *select,
97  float *d, float *Z, int *ldz,
98  float *sigma, char *bmat, int *n,
99  char *which, int *nev, float *tol,
100  float *resid, int *ncv, float *V,
101  int *ldv, int *iparam, int *ipntr,
102  float *workd, float *workl,
103  int *lworkl, int *info);
104 
105 // -----------------------------------------------------------------------------
106 // single precision nonsymmetric routines
107 
108 void ARPACK_F77NAME(snaupd)(int *ido, char *bmat, int *n, char *which,
109  int *nev, float *tol, float *resid,
110  int *ncv, float *V, int *ldv,
111  int *iparam, int *ipntr, float *workd,
112  float *workl, int *lworkl, int *info);
113 
114 void ARPACK_F77NAME(sneupd)(int *rvec, char *HowMny, int *select,
115  float *dr, float *di, float *Z,
116  int *ldz, float *sigmar,
117  float *sigmai, float *workev, char *bmat,
118  int *n, char *which, int *nev,
119  float *tol, float *resid, int *ncv,
120  float *V, int *ldv, int *iparam,
121  int *ipntr, float *workd, float *workl,
122  int *lworkl, int *info);
123 
124 
125 } // extern "C"
126 
127 
128 #endif // MIRTK_Arpack_H