-
Notifications
You must be signed in to change notification settings - Fork 0
/
blas.h
322 lines (270 loc) · 11.9 KB
/
blas.h
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
#ifndef BLAS_H_H
#define BLAS_H_H
#ifdef __cplusplus
extern "C" {
#endif
#include <complex.h>
/* BLAS Level 1 */
#define F77_asum(prefix, T) \
void prefix##asum_(const int *n, \
T *sx, const int *incx)
F77_asum(s, float);
F77_asum(sc, float _Complex);
F77_asum(d, double);
F77_asum(dz, double _Complex);
#define F77_axpy(prefix, T) \
void prefix##axpy_(const int *n, \
const T *sa, \
T *sx, \
int *incx, \
T *sy, \
int *incy)
F77_axpy(s, float);
F77_axpy(d, double);
F77_axpy(c, float _Complex);
F77_axpy(z, double _Complex);
#define F77_nrm2(prefix, T) \
void prefix##nrm2_(int *n, \
T *x, \
int *incx)
#define F77_copy(prefix, T) \
void prefix##copy_(int *n, \
T *sx, \
int *incx, \
T *sy, \
int *incy)
#define F77_dot(prefix, T) \
void prefix##dot_(int *n, \
T *sb, \
T *sx, \
int *incx, \
T *sy, \
int *incy)
#define F77_rot(prefix, T) \
void prefix##rot_(int *n, \
T *sb, \
T *sx, \
int *incx, \
T *sy, \
int *incy)
#define F77_scal(prefix, S, T) \
void prefix##scal_(int *n, \
S *sa, \
T *sx, \
int *incx)
#define F77_swap(prefix, T) \
void prefix##swap_(int *n, \
T *sx, \
int *incx, \
T *sy, \
int *incy)
/* BLAS Level 2 */
#define F77_gbmv(prefix, T) \
void prefix##gbmv_(char *trans, \
int *m, int *n, int *kl, int *ku, \
T *alpha, \
T *a, int *lda, \
T *x, int *incx, \
T *beta, \
T *y, int *incy)
#define F77_gemv(prefix, T) \
void prefix##gemv_(char *trans, \
int *m, int *n, \
T *alpha, \
T *a, int *lda, \
T *x, int *incx, \
T *beta, \
T *y, int *incy)
#define F77_ger(prefix, T) \
void prefix##ger_(int *m, int *n, \
T *alpha, \
T *x, int *incx, \
T *y, int *incy, \
T *a, int *lda)
#define F77_sbmv(prefix, T) \
void prefix##sbmv_(char *uplo, \
int *n, int *k, \
T *alpha, \
T *a, int *lda, \
T *x, int *incx, \
T *beta, \
T *y, int *incy)
#define F77_spmv(prefix, T) \
void prefix##spmv_(char *uplo, \
int *n, \
T *alpha, \
T *ap, \
T *x, int *incx, \
T *beta, \
T *y, int *incy)
#define F77_spr(prefix, T) \
void prefix##spr_(char *uplo, \
int *n, \
T *alpha, \
T *x, int *incx, \
T *ap)
#define F77_spr2(prefix, T) \
void prefix##spr2_(char *uplo, \
int *n, \
T *alpha, \
T *x, int *incx, \
T *y, int *incy, \
T *ap)
#define F77_symv(prefix, T) \
void prefix##symv_(char *uplo, \
int *n, \
T *alpha, \
T *a, int *lda, \
T *x, int *incx, \
T *beta, \
T *y, int *incy)
#define F77_syr(prefix, T) \
void prefix##syr_(char *uplo, \
int *n, \
T *alpha, \
T *x, int *incx, \
T *a, int *lda)
#define F77_syr2(prefix, T) \
void prefix##syr2_(char *uplo, \
int *n, \
T *alpha, \
T *x, int *incx, \
T *y, int *incy, \
T *a, int *lda)
#define F77_tbmv(prefix, T) \
void prefix##tbmv_(char *uplo, \
char *trans, char *diag, \
int *n, int *k, \
T *a, int *lda, \
T *x, int *incx)
#define F77_tbsv(prefix, T) \
void prefix##tbsv_(char *uplo, \
char *trans, char *diag, \
int *n, int *k, \
T *a, int *lda, \
T *x, int *incx)
#define F77_tpmv(prefix, T) \
void prefix##tpmv_(char *uplo, \
char *trans, char *diag, \
int *n, \
T *ap, \
T *x, int *incx)
#define F77_tpsv(prefix, T) \
void prefix##tpsv_(char *uplo, \
char *trans, char *diag, \
int *n, \
T *ap, \
T *x, int *incx)
#define F77_trmv(prefix, T) \
void prefix##trmv_(char *uplo, \
char *trans, char *diag, \
int *n, \
T *a, int *lda, \
T *x, int *incx)
#define F77_trsv(prefix, T) \
void prefix##trsv_(char *uplo, \
char *trans, char *diag, \
int *n, \
T *a, int *lda, \
T *x, int *incx)
/* BLAS Level 3 */
#define F77_gemm(prefix, T) \
void prefix##gemm_(const char *transa, \
const char *transb, \
const int *m, const int *n, const int *k, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb, \
T *beta, \
T *c, int *ldc)
F77_gemm(s, float);
F77_gemm(d, double);
F77_gemm(c, float _Complex);
F77_gemm(z, double _Complex);
#define F77_hemm(prefix, T) \
void prefix##hemm_(char *side, char *uplo, \
int *m, int *n, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb, \
T *beta, \
T *c, int *ldc)
F77_hemm(c, float _Complex);
F77_hemm(z, double _Complex);
#define F77_herk(prefix, S, T) \
void prefix##herk_(char *uplo, char *trans, \
int *n, int *k, \
S *alpha, \
T *a, int *lda, \
S *beta, \
T *c, int *ldc)
F77_herk(c, float, float _Complex);
F77_herk(z, double, double _Complex);
#define F77_her2k(prefix, S, T) \
void prefix##her2k_(char *uplo, char *trans, \
int *n, int *k, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb, \
S *beta, \
T *c, int *ldc)
F77_her2k(c, float, float _Complex);
F77_her2k(z, double, double _Complex);
#define F77_symm(prefix, T) \
void prefix##symm_(char *side, char *uplo, \
int *m, int *n, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb, \
T *beta, \
T *c, int *ldc)
F77_symm(s, float);
F77_symm(d, double);
F77_symm(c, float _Complex);
F77_symm(z, double _Complex);
#define F77_syrk(prefix, T) \
void prefix##syrk_(char *uplo, char *trans, \
int *n, int *k, \
T *alpha, \
T *a, int *lda, \
T *beta, \
T *c, int *ldc)
#define F77_syr2k(prefix, T) \
void prefix##syr2k_(char *uplo, char *trans, \
int *n, int *k, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb, \
T *beta, \
T *c, int *ldc)
F77_syr2k(s, float);
F77_syr2k(d, double);
F77_syr2k(c, float _Complex);
F77_syr2k(z, double _Complex);
#define F77_trmm(prefix, T) \
void prefix##trmm_(char *side, \
char *uplo, char *transa, char *diag, \
int *m, int *n, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb)
F77_trmm(s, float);
F77_trmm(d, double);
F77_trmm(c, float _Complex);
F77_trmm(z, double _Complex);
#define F77_trsm(prefix, T) \
void prefix##trsm_(char *side, char *uplo, \
char *transa, char *diag, \
int *m, int *n, \
T *alpha, \
T *a, int *lda, \
T *b, int *ldb)
F77_trsm(s, float);
F77_trsm(d, double);
F77_trsm(c, float _Complex);
F77_trsm(z, double _Complex);
void _b2c_xerbla(const char *routine, int arg_pos);
#ifdef __cplusplus
};
#endif
#endif