numo-linalg 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/README.md +80 -0
  4. data/Rakefile +18 -0
  5. data/ext/numo/linalg/blas/blas.c +352 -0
  6. data/ext/numo/linalg/blas/cblas.h +575 -0
  7. data/ext/numo/linalg/blas/cblas_t.h +563 -0
  8. data/ext/numo/linalg/blas/depend.erb +23 -0
  9. data/ext/numo/linalg/blas/extconf.rb +67 -0
  10. data/ext/numo/linalg/blas/gen/cogen.rb +72 -0
  11. data/ext/numo/linalg/blas/gen/decl.rb +203 -0
  12. data/ext/numo/linalg/blas/gen/desc.rb +8138 -0
  13. data/ext/numo/linalg/blas/gen/erbpp2.rb +339 -0
  14. data/ext/numo/linalg/blas/gen/replace_cblas_h.rb +27 -0
  15. data/ext/numo/linalg/blas/gen/spec.rb +93 -0
  16. data/ext/numo/linalg/blas/numo_blas.h +41 -0
  17. data/ext/numo/linalg/blas/tmpl/axpy.c +75 -0
  18. data/ext/numo/linalg/blas/tmpl/copy.c +57 -0
  19. data/ext/numo/linalg/blas/tmpl/def_c.c +3 -0
  20. data/ext/numo/linalg/blas/tmpl/def_d.c +3 -0
  21. data/ext/numo/linalg/blas/tmpl/def_s.c +3 -0
  22. data/ext/numo/linalg/blas/tmpl/def_z.c +3 -0
  23. data/ext/numo/linalg/blas/tmpl/dot.c +68 -0
  24. data/ext/numo/linalg/blas/tmpl/ger.c +114 -0
  25. data/ext/numo/linalg/blas/tmpl/init_class.c +20 -0
  26. data/ext/numo/linalg/blas/tmpl/init_module.c +12 -0
  27. data/ext/numo/linalg/blas/tmpl/lib.c +40 -0
  28. data/ext/numo/linalg/blas/tmpl/mm.c +214 -0
  29. data/ext/numo/linalg/blas/tmpl/module.c +9 -0
  30. data/ext/numo/linalg/blas/tmpl/mv.c +194 -0
  31. data/ext/numo/linalg/blas/tmpl/nrm2.c +79 -0
  32. data/ext/numo/linalg/blas/tmpl/rot.c +65 -0
  33. data/ext/numo/linalg/blas/tmpl/rotm.c +82 -0
  34. data/ext/numo/linalg/blas/tmpl/scal.c +69 -0
  35. data/ext/numo/linalg/blas/tmpl/sdsdot.c +77 -0
  36. data/ext/numo/linalg/blas/tmpl/set_prefix.c +16 -0
  37. data/ext/numo/linalg/blas/tmpl/swap.c +57 -0
  38. data/ext/numo/linalg/blas/tmpl/syr.c +102 -0
  39. data/ext/numo/linalg/blas/tmpl/syr2.c +110 -0
  40. data/ext/numo/linalg/blas/tmpl/syr2k.c +129 -0
  41. data/ext/numo/linalg/blas/tmpl/syrk.c +132 -0
  42. data/ext/numo/linalg/lapack/depend.erb +23 -0
  43. data/ext/numo/linalg/lapack/extconf.rb +45 -0
  44. data/ext/numo/linalg/lapack/gen/cogen.rb +74 -0
  45. data/ext/numo/linalg/lapack/gen/desc.rb +151278 -0
  46. data/ext/numo/linalg/lapack/gen/replace_lapacke_h.rb +32 -0
  47. data/ext/numo/linalg/lapack/gen/spec.rb +104 -0
  48. data/ext/numo/linalg/lapack/lapack.c +387 -0
  49. data/ext/numo/linalg/lapack/lapacke.h +16425 -0
  50. data/ext/numo/linalg/lapack/lapacke_config.h +119 -0
  51. data/ext/numo/linalg/lapack/lapacke_mangling.h +17 -0
  52. data/ext/numo/linalg/lapack/lapacke_t.h +10550 -0
  53. data/ext/numo/linalg/lapack/numo_lapack.h +42 -0
  54. data/ext/numo/linalg/lapack/tmpl/def_c.c +3 -0
  55. data/ext/numo/linalg/lapack/tmpl/def_d.c +7 -0
  56. data/ext/numo/linalg/lapack/tmpl/def_s.c +7 -0
  57. data/ext/numo/linalg/lapack/tmpl/def_z.c +3 -0
  58. data/ext/numo/linalg/lapack/tmpl/fact.c +179 -0
  59. data/ext/numo/linalg/lapack/tmpl/geev.c +123 -0
  60. data/ext/numo/linalg/lapack/tmpl/gels.c +232 -0
  61. data/ext/numo/linalg/lapack/tmpl/gesv.c +149 -0
  62. data/ext/numo/linalg/lapack/tmpl/gesvd.c +189 -0
  63. data/ext/numo/linalg/lapack/tmpl/ggev.c +138 -0
  64. data/ext/numo/linalg/lapack/tmpl/gqr.c +121 -0
  65. data/ext/numo/linalg/lapack/tmpl/init_class.c +20 -0
  66. data/ext/numo/linalg/lapack/tmpl/init_module.c +12 -0
  67. data/ext/numo/linalg/lapack/tmpl/lange.c +79 -0
  68. data/ext/numo/linalg/lapack/tmpl/lib.c +40 -0
  69. data/ext/numo/linalg/lapack/tmpl/module.c +9 -0
  70. data/ext/numo/linalg/lapack/tmpl/syev.c +91 -0
  71. data/ext/numo/linalg/lapack/tmpl/sygv.c +104 -0
  72. data/ext/numo/linalg/lapack/tmpl/trf.c +276 -0
  73. data/ext/numo/linalg/numo_linalg.h +115 -0
  74. data/lib/numo/linalg.rb +3 -0
  75. data/lib/numo/linalg/function.rb +1008 -0
  76. data/lib/numo/linalg/linalg.rb +7 -0
  77. data/lib/numo/linalg/loader.rb +174 -0
  78. data/lib/numo/linalg/use/atlas.rb +3 -0
  79. data/lib/numo/linalg/use/lapack.rb +3 -0
  80. data/lib/numo/linalg/use/mkl.rb +3 -0
  81. data/lib/numo/linalg/use/openblas.rb +3 -0
  82. data/lib/numo/linalg/version.rb +5 -0
  83. data/numo-linalg.gemspec +26 -0
  84. data/spec/lapack_spec.rb +13 -0
  85. metadata +172 -0
@@ -0,0 +1,563 @@
1
+ #ifndef NUMO_CBLAS_T_H
2
+ #define NUMO_CBLAS_T_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ /*
9
+ * ===========================================================================
10
+ * Prototypes for level 1 BLAS functions (complex are recast as routines)
11
+ * ===========================================================================
12
+ */
13
+ typedef float (*sdsdot_t)(const int N, const float alpha, const float *X,
14
+ const int incX, const float *Y, const int incY);
15
+ typedef double (*dsdot_t)(const int N, const float *X, const int incX, const float *Y,
16
+ const int incY);
17
+ typedef float (*sdot_t)(const int N, const float *X, const int incX,
18
+ const float *Y, const int incY);
19
+ typedef double (*ddot_t)(const int N, const double *X, const int incX,
20
+ const double *Y, const int incY);
21
+
22
+ /*
23
+ * Functions having prefixes Z and C only
24
+ */
25
+ typedef void (*cdotu_sub_t)(const int N, const scomplex *X, const int incX,
26
+ const scomplex *Y, const int incY, scomplex *dotu);
27
+ typedef void (*cdotc_sub_t)(const int N, const scomplex *X, const int incX,
28
+ const scomplex *Y, const int incY, scomplex *dotc);
29
+
30
+ typedef void (*zdotu_sub_t)(const int N, const dcomplex *X, const int incX,
31
+ const dcomplex *Y, const int incY, dcomplex *dotu);
32
+ typedef void (*zdotc_sub_t)(const int N, const dcomplex *X, const int incX,
33
+ const dcomplex *Y, const int incY, dcomplex *dotc);
34
+
35
+
36
+ /*
37
+ * Functions having prefixes S D SC DZ
38
+ */
39
+ typedef float (*snrm2_t)(const int N, const float *X, const int incX);
40
+ typedef float (*sasum_t)(const int N, const float *X, const int incX);
41
+
42
+ typedef double (*dnrm2_t)(const int N, const double *X, const int incX);
43
+ typedef double (*dasum_t)(const int N, const double *X, const int incX);
44
+
45
+ typedef float (*scnrm2_t)(const int N, const scomplex *X, const int incX);
46
+ typedef float (*scasum_t)(const int N, const scomplex *X, const int incX);
47
+
48
+ typedef double (*dznrm2_t)(const int N, const dcomplex *X, const int incX);
49
+ typedef double (*dzasum_t)(const int N, const dcomplex *X, const int incX);
50
+
51
+
52
+ /*
53
+ * Functions having standard 4 prefixes (S D C Z)
54
+ */
55
+ typedef CBLAS_INDEX (*isamax_t)(const int N, const float *X, const int incX);
56
+ typedef CBLAS_INDEX (*idamax_t)(const int N, const double *X, const int incX);
57
+ typedef CBLAS_INDEX (*icamax_t)(const int N, const scomplex *X, const int incX);
58
+ typedef CBLAS_INDEX (*izamax_t)(const int N, const dcomplex *X, const int incX);
59
+
60
+ /*
61
+ * ===========================================================================
62
+ * Prototypes for level 1 BLAS routines
63
+ * ===========================================================================
64
+ */
65
+
66
+ /*
67
+ * Routines with standard 4 prefixes (s, d, c, z)
68
+ */
69
+ typedef void (*sswap_t)(const int N, float *X, const int incX,
70
+ float *Y, const int incY);
71
+ typedef void (*scopy_t)(const int N, const float *X, const int incX,
72
+ float *Y, const int incY);
73
+ typedef void (*saxpy_t)(const int N, const float alpha, const float *X,
74
+ const int incX, float *Y, const int incY);
75
+
76
+ typedef void (*dswap_t)(const int N, double *X, const int incX,
77
+ double *Y, const int incY);
78
+ typedef void (*dcopy_t)(const int N, const double *X, const int incX,
79
+ double *Y, const int incY);
80
+ typedef void (*daxpy_t)(const int N, const double alpha, const double *X,
81
+ const int incX, double *Y, const int incY);
82
+
83
+ typedef void (*cswap_t)(const int N, scomplex *X, const int incX,
84
+ scomplex *Y, const int incY);
85
+ typedef void (*ccopy_t)(const int N, const scomplex *X, const int incX,
86
+ scomplex *Y, const int incY);
87
+ typedef void (*caxpy_t)(const int N, const scomplex *alpha, const scomplex *X,
88
+ const int incX, scomplex *Y, const int incY);
89
+
90
+ typedef void (*zswap_t)(const int N, dcomplex *X, const int incX,
91
+ dcomplex *Y, const int incY);
92
+ typedef void (*zcopy_t)(const int N, const dcomplex *X, const int incX,
93
+ dcomplex *Y, const int incY);
94
+ typedef void (*zaxpy_t)(const int N, const dcomplex *alpha, const dcomplex *X,
95
+ const int incX, dcomplex *Y, const int incY);
96
+
97
+
98
+ /*
99
+ * Routines with S and D prefix only
100
+ */
101
+ typedef void (*srotg_t)(float *a, float *b, float *c, float *s);
102
+ typedef void (*srotmg_t)(float *d1, float *d2, float *b1, const float b2, float *P);
103
+ typedef void (*srot_t)(const int N, float *X, const int incX,
104
+ float *Y, const int incY, const float c, const float s);
105
+ typedef void (*srotm_t)(const int N, float *X, const int incX,
106
+ float *Y, const int incY, const float *P);
107
+
108
+ typedef void (*drotg_t)(double *a, double *b, double *c, double *s);
109
+ typedef void (*drotmg_t)(double *d1, double *d2, double *b1, const double b2, double *P);
110
+ typedef void (*drot_t)(const int N, double *X, const int incX,
111
+ double *Y, const int incY, const double c, const double s);
112
+ typedef void (*drotm_t)(const int N, double *X, const int incX,
113
+ double *Y, const int incY, const double *P);
114
+
115
+
116
+ /*
117
+ * Routines with S D C Z CS and ZD prefixes
118
+ */
119
+ typedef void (*sscal_t)(const int N, const float alpha, float *X, const int incX);
120
+ typedef void (*dscal_t)(const int N, const double alpha, double *X, const int incX);
121
+ typedef void (*cscal_t)(const int N, const scomplex *alpha, scomplex *X, const int incX);
122
+ typedef void (*zscal_t)(const int N, const dcomplex *alpha, dcomplex *X, const int incX);
123
+ typedef void (*csscal_t)(const int N, const float alpha, scomplex *X, const int incX);
124
+ typedef void (*zdscal_t)(const int N, const double alpha, dcomplex *X, const int incX);
125
+
126
+ /*
127
+ * ===========================================================================
128
+ * Prototypes for level 2 BLAS
129
+ * ===========================================================================
130
+ */
131
+
132
+ /*
133
+ * Routines with standard 4 prefixes (S, D, C, Z)
134
+ */
135
+ typedef void (*sgemv_t)(const enum CBLAS_ORDER order,
136
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
137
+ const float alpha, const float *A, const int lda,
138
+ const float *X, const int incX, const float beta,
139
+ float *Y, const int incY);
140
+ typedef void (*sgbmv_t)(const enum CBLAS_ORDER order,
141
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
142
+ const int KL, const int KU, const float alpha,
143
+ const float *A, const int lda, const float *X,
144
+ const int incX, const float beta, float *Y, const int incY);
145
+ typedef void (*strmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
146
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
147
+ const int N, const float *A, const int lda,
148
+ float *X, const int incX);
149
+ typedef void (*stbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
150
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
151
+ const int N, const int K, const float *A, const int lda,
152
+ float *X, const int incX);
153
+ typedef void (*stpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
154
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
155
+ const int N, const float *Ap, float *X, const int incX);
156
+ typedef void (*strsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
157
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
158
+ const int N, const float *A, const int lda, float *X,
159
+ const int incX);
160
+ typedef void (*stbsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
161
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
162
+ const int N, const int K, const float *A, const int lda,
163
+ float *X, const int incX);
164
+ typedef void (*stpsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
165
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
166
+ const int N, const float *Ap, float *X, const int incX);
167
+
168
+ typedef void (*dgemv_t)(const enum CBLAS_ORDER order,
169
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
170
+ const double alpha, const double *A, const int lda,
171
+ const double *X, const int incX, const double beta,
172
+ double *Y, const int incY);
173
+ typedef void (*dgbmv_t)(const enum CBLAS_ORDER order,
174
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
175
+ const int KL, const int KU, const double alpha,
176
+ const double *A, const int lda, const double *X,
177
+ const int incX, const double beta, double *Y, const int incY);
178
+ typedef void (*dtrmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
179
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
180
+ const int N, const double *A, const int lda,
181
+ double *X, const int incX);
182
+ typedef void (*dtbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
183
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
184
+ const int N, const int K, const double *A, const int lda,
185
+ double *X, const int incX);
186
+ typedef void (*dtpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
187
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
188
+ const int N, const double *Ap, double *X, const int incX);
189
+ typedef void (*dtrsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
190
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
191
+ const int N, const double *A, const int lda, double *X,
192
+ const int incX);
193
+ typedef void (*dtbsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
194
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
195
+ const int N, const int K, const double *A, const int lda,
196
+ double *X, const int incX);
197
+ typedef void (*dtpsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
198
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
199
+ const int N, const double *Ap, double *X, const int incX);
200
+
201
+ typedef void (*cgemv_t)(const enum CBLAS_ORDER order,
202
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
203
+ const scomplex *alpha, const scomplex *A, const int lda,
204
+ const scomplex *X, const int incX, const scomplex *beta,
205
+ scomplex *Y, const int incY);
206
+ typedef void (*cgbmv_t)(const enum CBLAS_ORDER order,
207
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
208
+ const int KL, const int KU, const scomplex *alpha,
209
+ const scomplex *A, const int lda, const scomplex *X,
210
+ const int incX, const scomplex *beta, scomplex *Y, const int incY);
211
+ typedef void (*ctrmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
212
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
213
+ const int N, const scomplex *A, const int lda,
214
+ scomplex *X, const int incX);
215
+ typedef void (*ctbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
216
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
217
+ const int N, const int K, const scomplex *A, const int lda,
218
+ scomplex *X, const int incX);
219
+ typedef void (*ctpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
220
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
221
+ const int N, const scomplex *Ap, scomplex *X, const int incX);
222
+ typedef void (*ctrsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
223
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
224
+ const int N, const scomplex *A, const int lda, scomplex *X,
225
+ const int incX);
226
+ typedef void (*ctbsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
227
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
228
+ const int N, const int K, const scomplex *A, const int lda,
229
+ scomplex *X, const int incX);
230
+ typedef void (*ctpsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
231
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
232
+ const int N, const scomplex *Ap, scomplex *X, const int incX);
233
+
234
+ typedef void (*zgemv_t)(const enum CBLAS_ORDER order,
235
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
236
+ const dcomplex *alpha, const dcomplex *A, const int lda,
237
+ const dcomplex *X, const int incX, const dcomplex *beta,
238
+ dcomplex *Y, const int incY);
239
+ typedef void (*zgbmv_t)(const enum CBLAS_ORDER order,
240
+ const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
241
+ const int KL, const int KU, const dcomplex *alpha,
242
+ const dcomplex *A, const int lda, const dcomplex *X,
243
+ const int incX, const dcomplex *beta, dcomplex *Y, const int incY);
244
+ typedef void (*ztrmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
245
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
246
+ const int N, const dcomplex *A, const int lda,
247
+ dcomplex *X, const int incX);
248
+ typedef void (*ztbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
249
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
250
+ const int N, const int K, const dcomplex *A, const int lda,
251
+ dcomplex *X, const int incX);
252
+ typedef void (*ztpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
253
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
254
+ const int N, const dcomplex *Ap, dcomplex *X, const int incX);
255
+ typedef void (*ztrsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
256
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
257
+ const int N, const dcomplex *A, const int lda, dcomplex *X,
258
+ const int incX);
259
+ typedef void (*ztbsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
260
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
261
+ const int N, const int K, const dcomplex *A, const int lda,
262
+ dcomplex *X, const int incX);
263
+ typedef void (*ztpsv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
264
+ const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
265
+ const int N, const dcomplex *Ap, dcomplex *X, const int incX);
266
+
267
+
268
+ /*
269
+ * Routines with S and D prefixes only
270
+ */
271
+ typedef void (*ssymv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
272
+ const int N, const float alpha, const float *A,
273
+ const int lda, const float *X, const int incX,
274
+ const float beta, float *Y, const int incY);
275
+ typedef void (*ssbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
276
+ const int N, const int K, const float alpha, const float *A,
277
+ const int lda, const float *X, const int incX,
278
+ const float beta, float *Y, const int incY);
279
+ typedef void (*sspmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
280
+ const int N, const float alpha, const float *Ap,
281
+ const float *X, const int incX,
282
+ const float beta, float *Y, const int incY);
283
+ typedef void (*sger_t)(const enum CBLAS_ORDER order, const int M, const int N,
284
+ const float alpha, const float *X, const int incX,
285
+ const float *Y, const int incY, float *A, const int lda);
286
+ typedef void (*ssyr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
287
+ const int N, const float alpha, const float *X,
288
+ const int incX, float *A, const int lda);
289
+ typedef void (*sspr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
290
+ const int N, const float alpha, const float *X,
291
+ const int incX, float *Ap);
292
+ typedef void (*ssyr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
293
+ const int N, const float alpha, const float *X,
294
+ const int incX, const float *Y, const int incY, float *A,
295
+ const int lda);
296
+ typedef void (*sspr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
297
+ const int N, const float alpha, const float *X,
298
+ const int incX, const float *Y, const int incY, float *A);
299
+
300
+ typedef void (*dsymv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
301
+ const int N, const double alpha, const double *A,
302
+ const int lda, const double *X, const int incX,
303
+ const double beta, double *Y, const int incY);
304
+ typedef void (*dsbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
305
+ const int N, const int K, const double alpha, const double *A,
306
+ const int lda, const double *X, const int incX,
307
+ const double beta, double *Y, const int incY);
308
+ typedef void (*dspmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
309
+ const int N, const double alpha, const double *Ap,
310
+ const double *X, const int incX,
311
+ const double beta, double *Y, const int incY);
312
+ typedef void (*dger_t)(const enum CBLAS_ORDER order, const int M, const int N,
313
+ const double alpha, const double *X, const int incX,
314
+ const double *Y, const int incY, double *A, const int lda);
315
+ typedef void (*dsyr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
316
+ const int N, const double alpha, const double *X,
317
+ const int incX, double *A, const int lda);
318
+ typedef void (*dspr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
319
+ const int N, const double alpha, const double *X,
320
+ const int incX, double *Ap);
321
+ typedef void (*dsyr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
322
+ const int N, const double alpha, const double *X,
323
+ const int incX, const double *Y, const int incY, double *A,
324
+ const int lda);
325
+ typedef void (*dspr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
326
+ const int N, const double alpha, const double *X,
327
+ const int incX, const double *Y, const int incY, double *A);
328
+
329
+
330
+ /*
331
+ * Routines with C and Z prefixes only
332
+ */
333
+ typedef void (*chemv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
334
+ const int N, const scomplex *alpha, const scomplex *A,
335
+ const int lda, const scomplex *X, const int incX,
336
+ const scomplex *beta, scomplex *Y, const int incY);
337
+ typedef void (*chbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
338
+ const int N, const int K, const scomplex *alpha, const scomplex *A,
339
+ const int lda, const scomplex *X, const int incX,
340
+ const scomplex *beta, scomplex *Y, const int incY);
341
+ typedef void (*chpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
342
+ const int N, const scomplex *alpha, const scomplex *Ap,
343
+ const scomplex *X, const int incX,
344
+ const scomplex *beta, scomplex *Y, const int incY);
345
+ typedef void (*cgeru_t)(const enum CBLAS_ORDER order, const int M, const int N,
346
+ const scomplex *alpha, const scomplex *X, const int incX,
347
+ const scomplex *Y, const int incY, scomplex *A, const int lda);
348
+ typedef void (*cgerc_t)(const enum CBLAS_ORDER order, const int M, const int N,
349
+ const scomplex *alpha, const scomplex *X, const int incX,
350
+ const scomplex *Y, const int incY, scomplex *A, const int lda);
351
+ typedef void (*cher_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
352
+ const int N, const float alpha, const scomplex *X, const int incX,
353
+ scomplex *A, const int lda);
354
+ typedef void (*chpr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
355
+ const int N, const float alpha, const scomplex *X,
356
+ const int incX, scomplex *A);
357
+ typedef void (*cher2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
358
+ const scomplex *alpha, const scomplex *X, const int incX,
359
+ const scomplex *Y, const int incY, scomplex *A, const int lda);
360
+ typedef void (*chpr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
361
+ const scomplex *alpha, const scomplex *X, const int incX,
362
+ const scomplex *Y, const int incY, scomplex *Ap);
363
+
364
+ typedef void (*zhemv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
365
+ const int N, const dcomplex *alpha, const dcomplex *A,
366
+ const int lda, const dcomplex *X, const int incX,
367
+ const dcomplex *beta, dcomplex *Y, const int incY);
368
+ typedef void (*zhbmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
369
+ const int N, const int K, const dcomplex *alpha, const dcomplex *A,
370
+ const int lda, const dcomplex *X, const int incX,
371
+ const dcomplex *beta, dcomplex *Y, const int incY);
372
+ typedef void (*zhpmv_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
373
+ const int N, const dcomplex *alpha, const dcomplex *Ap,
374
+ const dcomplex *X, const int incX,
375
+ const dcomplex *beta, dcomplex *Y, const int incY);
376
+ typedef void (*zgeru_t)(const enum CBLAS_ORDER order, const int M, const int N,
377
+ const dcomplex *alpha, const dcomplex *X, const int incX,
378
+ const dcomplex *Y, const int incY, dcomplex *A, const int lda);
379
+ typedef void (*zgerc_t)(const enum CBLAS_ORDER order, const int M, const int N,
380
+ const dcomplex *alpha, const dcomplex *X, const int incX,
381
+ const dcomplex *Y, const int incY, dcomplex *A, const int lda);
382
+ typedef void (*zher_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
383
+ const int N, const double alpha, const dcomplex *X, const int incX,
384
+ dcomplex *A, const int lda);
385
+ typedef void (*zhpr_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
386
+ const int N, const double alpha, const dcomplex *X,
387
+ const int incX, dcomplex *A);
388
+ typedef void (*zher2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
389
+ const dcomplex *alpha, const dcomplex *X, const int incX,
390
+ const dcomplex *Y, const int incY, dcomplex *A, const int lda);
391
+ typedef void (*zhpr2_t)(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
392
+ const dcomplex *alpha, const dcomplex *X, const int incX,
393
+ const dcomplex *Y, const int incY, dcomplex *Ap);
394
+
395
+ /*
396
+ * ===========================================================================
397
+ * Prototypes for level 3 BLAS
398
+ * ===========================================================================
399
+ */
400
+
401
+ /*
402
+ * Routines with standard 4 prefixes (S, D, C, Z)
403
+ */
404
+ typedef void (*sgemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
405
+ const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
406
+ const int K, const float alpha, const float *A,
407
+ const int lda, const float *B, const int ldb,
408
+ const float beta, float *C, const int ldc);
409
+ typedef void (*ssymm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
410
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
411
+ const float alpha, const float *A, const int lda,
412
+ const float *B, const int ldb, const float beta,
413
+ float *C, const int ldc);
414
+ typedef void (*ssyrk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
415
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
416
+ const float alpha, const float *A, const int lda,
417
+ const float beta, float *C, const int ldc);
418
+ typedef void (*ssyr2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
419
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
420
+ const float alpha, const float *A, const int lda,
421
+ const float *B, const int ldb, const float beta,
422
+ float *C, const int ldc);
423
+ typedef void (*strmm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
424
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
425
+ const enum CBLAS_DIAG Diag, const int M, const int N,
426
+ const float alpha, const float *A, const int lda,
427
+ float *B, const int ldb);
428
+ typedef void (*strsm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
429
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
430
+ const enum CBLAS_DIAG Diag, const int M, const int N,
431
+ const float alpha, const float *A, const int lda,
432
+ float *B, const int ldb);
433
+
434
+ typedef void (*dgemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
435
+ const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
436
+ const int K, const double alpha, const double *A,
437
+ const int lda, const double *B, const int ldb,
438
+ const double beta, double *C, const int ldc);
439
+ typedef void (*dsymm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
440
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
441
+ const double alpha, const double *A, const int lda,
442
+ const double *B, const int ldb, const double beta,
443
+ double *C, const int ldc);
444
+ typedef void (*dsyrk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
445
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
446
+ const double alpha, const double *A, const int lda,
447
+ const double beta, double *C, const int ldc);
448
+ typedef void (*dsyr2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
449
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
450
+ const double alpha, const double *A, const int lda,
451
+ const double *B, const int ldb, const double beta,
452
+ double *C, const int ldc);
453
+ typedef void (*dtrmm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
454
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
455
+ const enum CBLAS_DIAG Diag, const int M, const int N,
456
+ const double alpha, const double *A, const int lda,
457
+ double *B, const int ldb);
458
+ typedef void (*dtrsm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
459
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
460
+ const enum CBLAS_DIAG Diag, const int M, const int N,
461
+ const double alpha, const double *A, const int lda,
462
+ double *B, const int ldb);
463
+
464
+ typedef void (*cgemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
465
+ const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
466
+ const int K, const scomplex *alpha, const scomplex *A,
467
+ const int lda, const scomplex *B, const int ldb,
468
+ const scomplex *beta, scomplex *C, const int ldc);
469
+ typedef void (*csymm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
470
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
471
+ const scomplex *alpha, const scomplex *A, const int lda,
472
+ const scomplex *B, const int ldb, const scomplex *beta,
473
+ scomplex *C, const int ldc);
474
+ typedef void (*csyrk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
475
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
476
+ const scomplex *alpha, const scomplex *A, const int lda,
477
+ const scomplex *beta, scomplex *C, const int ldc);
478
+ typedef void (*csyr2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
479
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
480
+ const scomplex *alpha, const scomplex *A, const int lda,
481
+ const scomplex *B, const int ldb, const scomplex *beta,
482
+ scomplex *C, const int ldc);
483
+ typedef void (*ctrmm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
484
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
485
+ const enum CBLAS_DIAG Diag, const int M, const int N,
486
+ const scomplex *alpha, const scomplex *A, const int lda,
487
+ scomplex *B, const int ldb);
488
+ typedef void (*ctrsm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
489
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
490
+ const enum CBLAS_DIAG Diag, const int M, const int N,
491
+ const scomplex *alpha, const scomplex *A, const int lda,
492
+ scomplex *B, const int ldb);
493
+
494
+ typedef void (*zgemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
495
+ const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
496
+ const int K, const dcomplex *alpha, const dcomplex *A,
497
+ const int lda, const dcomplex *B, const int ldb,
498
+ const dcomplex *beta, dcomplex *C, const int ldc);
499
+ typedef void (*zsymm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
500
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
501
+ const dcomplex *alpha, const dcomplex *A, const int lda,
502
+ const dcomplex *B, const int ldb, const dcomplex *beta,
503
+ dcomplex *C, const int ldc);
504
+ typedef void (*zsyrk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
505
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
506
+ const dcomplex *alpha, const dcomplex *A, const int lda,
507
+ const dcomplex *beta, dcomplex *C, const int ldc);
508
+ typedef void (*zsyr2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
509
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
510
+ const dcomplex *alpha, const dcomplex *A, const int lda,
511
+ const dcomplex *B, const int ldb, const dcomplex *beta,
512
+ dcomplex *C, const int ldc);
513
+ typedef void (*ztrmm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
514
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
515
+ const enum CBLAS_DIAG Diag, const int M, const int N,
516
+ const dcomplex *alpha, const dcomplex *A, const int lda,
517
+ dcomplex *B, const int ldb);
518
+ typedef void (*ztrsm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
519
+ const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
520
+ const enum CBLAS_DIAG Diag, const int M, const int N,
521
+ const dcomplex *alpha, const dcomplex *A, const int lda,
522
+ dcomplex *B, const int ldb);
523
+
524
+
525
+ /*
526
+ * Routines with prefixes C and Z only
527
+ */
528
+ typedef void (*chemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
529
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
530
+ const scomplex *alpha, const scomplex *A, const int lda,
531
+ const scomplex *B, const int ldb, const scomplex *beta,
532
+ scomplex *C, const int ldc);
533
+ typedef void (*cherk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
534
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
535
+ const float alpha, const scomplex *A, const int lda,
536
+ const float beta, scomplex *C, const int ldc);
537
+ typedef void (*cher2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
538
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
539
+ const scomplex *alpha, const scomplex *A, const int lda,
540
+ const scomplex *B, const int ldb, const float beta,
541
+ scomplex *C, const int ldc);
542
+
543
+ typedef void (*zhemm_t)(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
544
+ const enum CBLAS_UPLO Uplo, const int M, const int N,
545
+ const dcomplex *alpha, const dcomplex *A, const int lda,
546
+ const dcomplex *B, const int ldb, const dcomplex *beta,
547
+ dcomplex *C, const int ldc);
548
+ typedef void (*zherk_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
549
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
550
+ const double alpha, const dcomplex *A, const int lda,
551
+ const double beta, dcomplex *C, const int ldc);
552
+ typedef void (*zher2k_t)(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
553
+ const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
554
+ const dcomplex *alpha, const dcomplex *A, const int lda,
555
+ const dcomplex *B, const int ldb, const double beta,
556
+ dcomplex *C, const int ldc);
557
+
558
+ typedef void (*xerbla_t)(int p, const char *rout, const char *form, ...);
559
+
560
+ #ifdef __cplusplus
561
+ }
562
+ #endif
563
+ #endif