forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharpack-tests-blasint.patch
158 lines (151 loc) · 4.75 KB
/
arpack-tests-blasint.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
diff -urN arpack-ng-3.2.0/TESTS/bug_1315_double.c arpack-ng-3.2.0-BLASINT/TESTS/bug_1315_double.c
--- arpack-ng-3.2.0/TESTS/bug_1315_double.c 2014-11-14 09:47:06.000000000 -0500
+++ arpack-ng-3.2.0-BLASINT/TESTS/bug_1315_double.c 2015-08-10 01:08:29.000000000 -0400
@@ -9,15 +9,18 @@
* This is not efficient since the problem is
* symmetric but is done to exhibit the bug.
* */
-
-extern void dnaupd_(int *, char *, int *, char *, int *,
- double *, double *, int *, double *,
- int *, int *, int *, double *,
- double *, int *, int *);
-
-extern void dneupd_( int*, char*, int *, double *, double *, double *, int*, double *,
- double *, double *, char *, int *, char *, int *, double *, double *, int *,
- double *, int *, int *, int *, double *, double *, int *, int * );
+#ifndef BLASINT
+#define BLASINT int
+#endif
+
+extern void dnaupd_(BLASINT *, char *, BLASINT *, char *, BLASINT *,
+ double *, double *, BLASINT *, double *,
+ BLASINT *, BLASINT *, BLASINT *, double *,
+ double *, BLASINT *, BLASINT *);
+
+extern void dneupd_( BLASINT*, char*, BLASINT *, double *, double *, double *, BLASINT*, double *,
+ double *, double *, char *, BLASINT *, char *, BLASINT *, double *, double *, BLASINT *,
+ double *, BLASINT *, BLASINT *, BLASINT *, double *, double *, BLASINT *, BLASINT * );
void matVec(double * x, double * y) {
int i;
@@ -26,26 +29,26 @@
};
int main() {
- int ido = 0;
+ BLASINT ido = 0;
char bmat[] = "I";
- int N = 1000;
+ BLASINT N = 1000;
char which[] = "LM";
- int nev = 9;
+ BLASINT nev = 9;
double tol = 0;
double resid[N];
- int ncv = 2*nev+1;
+ BLASINT ncv = 2*nev+1;
double V[ncv*N];
- int ldv = N;
- int iparam[11];
- int ipntr[14];
+ BLASINT ldv = N;
+ BLASINT iparam[11];
+ BLASINT ipntr[14];
double workd[3*N];
- int rvec = 1;
+ BLASINT rvec = 1;
char howmny[] = "A";
double* dr = (double*) malloc((nev+1)*sizeof(double));
double* di = (double*) malloc((nev+1)*sizeof(double));
- int select[3*ncv];
+ BLASINT select[3*ncv];
double z[(N+1)*(nev+1)];
- int ldz = N+1;
+ BLASINT ldz = N+1;
double sigmar=0;
double sigmai=0;
double workev[3*ncv];
@@ -55,8 +58,8 @@
double workl[3*(ncv*ncv) + 6*ncv];
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
workl[k] = 0;
- int lworkl = 3*(ncv*ncv) + 6*ncv;
- int info = 0;
+ BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
+ BLASINT info = 0;
iparam[0] = 1;
iparam[2] = 10*N;
diff -urN arpack-ng-3.2.0/TESTS/bug_1315_single.c arpack-ng-3.2.0-BLASINT/TESTS/bug_1315_single.c
--- arpack-ng-3.2.0/TESTS/bug_1315_single.c 2014-11-14 09:47:06.000000000 -0500
+++ arpack-ng-3.2.0-BLASINT/TESTS/bug_1315_single.c 2015-08-10 01:29:58.000000000 -0400
@@ -9,15 +9,18 @@
* This is not efficient since the problem is
* symmetric but is done to exhibit the bug.
*/
-
-extern void snaupd_(int *, char *, int *, char *, int *,
- float *, float *, int *, float *,
- int *, int *, int *, float *,
- float *, int *, int *);
-
-extern void sneupd_( int*, char*, int *, float *, float *, float *, int*, float *,
- float *, float *, char *, int *, char *, int *, float *, float *, int *,
- float *, int *, int *, int *, float *, float *, int *, int * );
+#ifndef BLASINT
+#define BLASINT int
+#endif
+
+extern void snaupd_(BLASINT *, char *, BLASINT *, char *, BLASINT *,
+ float *, float *, BLASINT *, float *,
+ BLASINT *, BLASINT *, BLASINT *, float *,
+ float *, BLASINT *, BLASINT *);
+
+extern void sneupd_( BLASINT*, char*, BLASINT *, float *, float *, float *, BLASINT*, float *,
+ float *, float *, char *, BLASINT *, char *, BLASINT *, float *, float *, BLASINT *,
+ float *, BLASINT *, BLASINT *, BLASINT *, float *, float *, BLASINT *, BLASINT * );
void matVec(float * x, float * y) {
@@ -27,26 +30,26 @@
};
int main() {
- int ido = 0;
+ BLASINT ido = 0;
char bmat[] = "I";
- int N = 1000;
+ BLASINT N = 1000;
char which[] = "LM";
- int nev = 9;
+ BLASINT nev = 9;
float tol = 0;
float resid[N];
- int ncv = 2*nev+1;
+ BLASINT ncv = 2*nev+1;
float V[ncv*N];
- int ldv = N;
- int iparam[11];
- int ipntr[14];
+ BLASINT ldv = N;
+ BLASINT iparam[11];
+ BLASINT ipntr[14];
float workd[3*N];
- int rvec = 1;
+ BLASINT rvec = 1;
char howmny[] = "A";
float* dr = (float*) malloc((nev+1)*sizeof(float));
float* di = (float*) malloc((nev+1)*sizeof(float));
- int select[3*ncv];
+ BLASINT select[3*ncv];
float z[(N+1)*(nev+1)];
- int ldz = N+1;
+ BLASINT ldz = N+1;
float sigmar=0;
float sigmai=0;
float workev[3*ncv];
@@ -56,8 +59,8 @@
float workl[3*(ncv*ncv) + 6*ncv];
for (k=0; k < 3*(ncv*ncv) + 6*ncv; ++k )
workl[k] = 0;
- int lworkl = 3*(ncv*ncv) + 6*ncv;
- int info = 0;
+ BLASINT lworkl = 3*(ncv*ncv) + 6*ncv;
+ BLASINT info = 0;
iparam[0] = 1;
iparam[2] = 10*N;