54 extern "C" void dgemm_(
const char *ta,
const char *tb,
55 const int *n,
const int *k,
const int *l,
56 const double *alpha,
const double *A,
const int *lda,
57 const double *B,
const int *ldb,
58 const double *beta,
double *C,
const int *ldc);
59 extern "C" void dpptrf_(
const char *uplo,
const int *n,
double* ap,
int *info);
60 extern "C" void dspgst_(
const int *itype,
const char *uplo,
const int *n,
61 double* ap,
const double *bp,
int *info);
62 extern "C" void dtptri_(
const char *uplo,
const char *diag,
const int *n,
63 double* ap,
int *info);
66 extern "C" void dtrmm_(
const char *
side,
const char *uplo,
const char *transa,
67 const char *diag,
const int *m,
const int *n,
68 const double *alpha,
const double *A,
const int *lda,
69 double *B,
const int *ldb);
70 extern "C" void dsygv_(
const int *itype,
const char *jobz,
71 const char *uplo,
const int *n,
72 double *A,
const int *lda,
double *B,
const int *ldb,
73 double* w,
double* work,
const int *lwork,
int *info);
74 extern "C" void dggev_(
const char *jobbl,
const char *jobvr,
const int *n,
75 double *A,
const int *lda,
double *B,
const int *ldb,
76 double *alphar,
double *alphai,
double *beta,
77 double *vl,
const int *ldvl,
78 double *vr,
const int *ldvr,
79 double *work,
const int *lwork,
int *info);
80 extern "C" void dpotrf_(
const char *uplo,
const int *n,
double *A,
81 const int *lda,
int *info);
82 extern "C" void dtrtri_(
const char *uplo,
const char *diag,
const int *n,
83 double *A,
const int *lda,
int *info);
84 extern "C" void dsyrk_(
const char *uplo,
const char *trans,
const int *n,
85 const int *k,
const double *alpha,
const double *A,
86 const int *lda,
const double *beta,
87 double *C,
const int *ldc);
88 extern "C" void dsymm_(
const char *
side,
const char *uplo,
89 const int *m,
const int *n,
90 const double *alpha,
const double *A,
const int *lda,
91 const double *B,
const int *ldb,
const double* beta,
92 double *C,
const int *ldc);
93 extern "C" void dpocon_(
const char *uplo,
const int *n,
const double *A,
94 const int *lda,
const double *anorm,
double *rcond,
95 double *work,
int *iwork,
int *info);
96 extern "C" void dstevx_(
const char *jobz,
const char *range,
const int *n,
97 double *d,
double *e,
const double *vl,
98 const double *vu,
const int *il,
const int *iu,
99 const double *abstol,
int *m,
double *w,
double *z,
100 const int *ldz,
double *work,
int *iwork,
int *ifail,
102 extern "C" void dstevr_(
const char *jobz,
const char *range,
const int *n,
103 double *d,
double *e,
const double *vl,
104 const double *vu,
const int *il,
const int *iu,
105 const double *abstol,
int *m,
double *w,
double *z,
106 const int *ldz,
int* isuppz,
double *work,
int* lwork,
107 int *iwork,
int* liwork,
int *info);
108 extern "C" void dsyev_(
const char *jobz,
const char *uplo,
const int *n,
109 double *a,
const int *lda,
double *w,
double *work,
110 const int *lwork,
int *info);
113 extern "C" void dgemv_(
const char *ta,
const int *m,
const int *n,
114 const double *alpha,
const double *A,
const int *lda,
115 const double *x,
const int *incx,
const double *beta,
116 double *y,
const int *incy);
117 extern "C" void dsymv_(
const char *uplo,
const int *n,
118 const double *alpha,
const double *A,
const int *lda,
119 const double *x,
const int *incx,
const double *beta,
120 double *y,
const int *incy);
121 extern "C" void dtrmv_(
const char *uplo,
const char *trans,
const char *diag,
122 const int *n,
const double *A,
const int *lda,
123 double *x,
const int *incx);
125 extern "C" void dscal_(
const int* n,
const double* da,
double* dx,
127 extern "C" double ddot_(
const int* n,
const double* dx,
const int* incx,
128 const double* dy,
const int* incy);
129 extern "C" void daxpy_(
const int* n,
const double* da,
const double* dx,
130 const int* incx,
double* dy,
const int* incy);
134 extern "C" void sgemm_(
const char *ta,
const char *tb,
135 const int *n,
const int *k,
const int *l,
136 const float *alpha,
const float *A,
const int *lda,
137 const float *B,
const int *ldb,
138 const float *beta,
float *C,
const int *ldc);
139 extern "C" void spptrf_(
const char *uplo,
const int *n,
float* ap,
int *info);
140 extern "C" void sspgst_(
const int *itype,
const char *uplo,
const int *n,
141 float* ap,
const float *bp,
int *info);
142 extern "C" void stptri_(
const char *uplo,
const char *diag,
const int *n,
143 float* ap,
int *info);
146 extern "C" void strmm_(
const char *
side,
const char *uplo,
const char *transa,
147 const char *diag,
const int *m,
const int *n,
148 const float *alpha,
const float *A,
const int *lda,
149 float *B,
const int *ldb);
150 extern "C" void ssygv_(
const int *itype,
const char *jobz,
151 const char *uplo,
const int *n,
152 float *A,
const int *lda,
float *B,
const int *ldb,
153 float* w,
float* work,
const int *lwork,
int *info);
154 extern "C" void sggev_(
const char *jobbl,
const char *jobvr,
const int *n,
155 float *A,
const int *lda,
float *B,
const int *ldb,
156 float *alphar,
float *alphai,
float *beta,
157 float *vl,
const int *ldvl,
158 float *vr,
const int *ldvr,
159 float *work,
const int *lwork,
int *info);
160 extern "C" void spotrf_(
const char *uplo,
const int *n,
float *A,
161 const int *lda,
int *info);
162 extern "C" void strtri_(
const char *uplo,
const char *diag,
const int *n,
163 float *A,
const int *lda,
int *info);
164 extern "C" void ssyrk_(
const char *uplo,
const char *trans,
const int *n,
165 const int *k,
const float *alpha,
const float *A,
166 const int *lda,
const float *beta,
167 float *C,
const int *ldc);
168 extern "C" void ssymm_(
const char *
side,
const char *uplo,
169 const int *m,
const int *n,
170 const float *alpha,
const float *A,
const int *lda,
171 const float *B,
const int *ldb,
const float* beta,
172 float *C,
const int *ldc);
173 extern "C" void spocon_(
const char *uplo,
const int *n,
const float *A,
174 const int *lda,
const float *anorm,
float *rcond,
175 float *work,
int *iwork,
int *info);
176 extern "C" void sstevx_(
const char *jobz,
const char *range,
const int *n,
177 float *d,
float *e,
const float *vl,
178 const float *vu,
const int *il,
const int *iu,
179 const float *abstol,
int *m,
float *w,
float *z,
180 const int *ldz,
float *work,
int *iwork,
int *ifail,
182 extern "C" void sstevr_(
const char *jobz,
const char *range,
const int *n,
183 float *d,
float *e,
const float *vl,
184 const float *vu,
const int *il,
const int *iu,
185 const float *abstol,
int *m,
float *w,
float *z,
186 const int *ldz,
int* isuppz,
float *work,
int* lwork,
187 int *iwork,
int* liwork,
int *info);
188 extern "C" void ssyev_(
const char *jobz,
const char *uplo,
const int *n,
189 float *a,
const int *lda,
float *w,
float *work,
190 const int *lwork,
int *info);
193 extern "C" void sgemv_(
const char *ta,
const int *m,
const int *n,
194 const float *alpha,
const float *A,
const int *lda,
195 const float *x,
const int *incx,
const float *beta,
196 float *y,
const int *incy);
197 extern "C" void ssymv_(
const char *uplo,
const int *n,
198 const float *alpha,
const float *A,
const int *lda,
199 const float *x,
const int *incx,
const float *beta,
200 float *y,
const int *incy);
201 extern "C" void strmv_(
const char *uplo,
const char *trans,
const char *diag,
202 const int *n,
const float *A,
const int *lda,
203 float *x,
const int *incx);
205 extern "C" void sscal_(
const int* n,
const float* da,
float* dx,
210 extern "C" double sdot_(
const int* n,
const float* dx,
const int* incx,
211 const float* dy,
const int* incy);
213 extern "C" void saxpy_(
const int* n,
const float* da,
const float* dx,
214 const int* incx,
float* dy,
const int* incy);
225 inline static void gemm(
const char *ta,
const char *tb,
226 const int *n,
const int *k,
const int *l,
227 const T *alpha,
const T *A,
const int *lda,
228 const T *B,
const int *ldb,
229 const T *beta,T *C,
const int *ldc) {
230 template_blas_gemm(ta,tb,n,k,l,alpha,A,lda,B,ldb,beta,C,ldc);
237 inline static void pptrf(
const char *uplo,
const int *n, T* ap,
int *info) {
242 inline static void spgst(
const int *itype,
const char *uplo,
const int *n,
243 T* ap,
const T *bp,
int *info) {
249 inline static void tptri(
const char *uplo,
const char *diag,
const int *n,
255 inline static void trmm(
const char *
side,
const char *uplo,
256 const char *transa,
const char *diag,
257 const int *m,
const int *n,
258 const T *alpha,
const T *A,
const int *lda,
259 T *B,
const int *ldb) {
260 template_blas_trmm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb);
267 inline static void sygv(
const int *itype,
const char *jobz,
268 const char *uplo,
const int *n,
269 T *A,
const int *lda,T *B,
const int *ldb,
270 T* w,T* work,
const int *lwork,
int *info) {
271 template_lapack_sygv(itype,jobz,uplo,n,A,lda,B,ldb,w,work,lwork,info);
275 inline static void ggev(
const char *jobbl,
const char *jobvr,
276 const int *n, T *A,
const int *lda,
277 T *B,
const int *ldb, T *alphar,
278 T *alphai, T *beta, T *vl,
279 const int *ldvl, T *vr,
const int *ldvr,
280 T *work,
const int *lwork,
int *info) {
281 template_lapack_ggev(jobbl, jobvr, n, A, lda, B, ldb, alphar, alphai, beta, vl,
282 ldvl, vr, ldvr, work, lwork, info);
288 inline static void potrf(
const char *uplo,
const int *n, T *A,
289 const int *lda,
int *info) {
295 inline static void trtri(
const char *uplo,
const char *diag,
const int *n,
296 T *A,
const int *lda,
int *info) {
300 uploCopy[0] = uplo[0];
302 diagCopy[0] = diag[0];
308 inline static void syrk(
const char *uplo,
const char *trans,
const int *n,
309 const int *k,
const T *alpha,
const T *A,
310 const int *lda,
const T *beta,
311 T *C,
const int *ldc) {
316 inline static void symm(
const char *
side,
const char *uplo,
317 const int *m,
const int *n,
318 const T *alpha,
const T *A,
const int *lda,
319 const T *B,
const int *ldb,
const T* beta,
320 T *C,
const int *ldc) {
321 template_blas_symm(side, uplo, m, n, alpha, A, lda, B, ldb, beta, C, ldc);
325 inline static void pocon(
const char *uplo,
const int *n,
const T *A,
326 const int *lda,
const T *anorm, T *rcond,
327 T *work,
int *iwork,
int *info) {
332 inline static void stevx(
const char *jobz,
const char *range,
333 const int *n, T *d, T *e,
const T *vl,
334 const T *vu,
const int *il,
const int *iu,
335 const T *abstol,
int *m, T *w, T *z,
336 const int *ldz, T *work,
int *iwork,
int *ifail,
338 template_lapack_stevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
339 work, iwork, ifail, info);
343 inline static void stevr(
const char *jobz,
const char *range,
const int *n,
344 T *d, T *e,
const T *vl,
345 const T *vu,
const int *il,
const int *iu,
346 const T *abstol,
int *m, T *w, T *z,
347 const int *ldz,
int* isuppz, T *work,
int* lwork,
348 int *iwork,
int* liwork,
int *info) {
349 template_lapack_stevr(jobz, range, n, d, e, vl, vu, il, iu, abstol,
350 m, w, z, ldz, isuppz,
351 work, lwork, iwork, liwork, info);
356 inline static void syev(
const char *jobz,
const char *uplo,
const int *n,
357 T *a,
const int *lda, T *w, T *work,
358 const int *lwork,
int *info) {
365 inline static void gemv(
const char *ta,
const int *m,
const int *n,
366 const T *alpha,
const T *A,
368 const T *x,
const int *incx,
369 const T *beta, T *y,
const int *incy) {
370 template_blas_gemv(ta, m, n, alpha, A, lda, x, incx, beta, y, incy);
374 inline static void symv(
const char *uplo,
const int *n,
375 const T *alpha,
const T *A,
376 const int *lda,
const T *x,
377 const int *incx,
const T *beta,
378 T *y,
const int *incy) {
383 inline static void trmv(
const char *uplo,
const char *trans,
384 const char *diag,
const int *n,
385 const T *A,
const int *lda,
386 T *x,
const int *incx) {
393 inline static void scal(
const int* n,
const T* da, T* dx,
399 inline static T
dot(
const int* n,
const T* dx,
const int* incx,
400 const T* dy,
const int* incy) {
405 inline static void axpy(
const int* n,
const T* da,
const T* dx,
406 const int* incx, T* dy,
const int* incy) {
416 #ifndef USE_LINALG_TEMPLATES
422 const int *n,
const int *k,
const int *l,
424 const double *
A,
const int *lda,
425 const double *
B,
const int *ldb,
427 double *C,
const int *ldc) {
429 clock_t start = clock();
430 dgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
431 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
434 dgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
440 double* ap,
int *info) {
442 clock_t start = clock();
444 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
454 double* ap,
const double *bp,
int *info) {
456 clock_t start = clock();
457 dspgst_(itype,uplo,n,ap,bp,info);
458 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
461 dspgst_(itype,uplo,n,ap,bp,info);
467 double* ap,
int *info) {
469 clock_t start = clock();
471 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
481 const char *diag,
const int *m,
const int *n,
483 const double *
A,
const int *lda,
484 double *
B,
const int *ldb) {
486 clock_t start = clock();
487 dtrmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
488 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
491 dtrmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
497 const char *uplo,
const int *n,
498 double *
A,
const int *lda,
499 double *
B,
const int *ldb,
500 double* w,
double* work,
501 const int *lwork,
int *info) {
503 clock_t start = clock();
504 dsygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
505 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
508 dsygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
514 const int *n,
double *
A,
const int *lda,
515 double *
B,
const int *ldb,
double *alphar,
516 double *alphai,
double *beta,
double *vl,
517 const int *ldvl,
double *vr,
const int *ldvr,
518 double *work,
const int *lwork,
int *info) {
520 clock_t start = clock();
521 dggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
522 ldvl, vr, ldvr, work, lwork, info);
523 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
526 dggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
527 ldvl, vr, ldvr, work, lwork, info);
534 const int *lda,
int *info) {
536 clock_t start = clock();
538 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
547 double *
A,
const int *lda,
int *info) {
549 clock_t start = clock();
550 dtrtri_(uplo, diag, n,
A, lda, info);
551 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
554 dtrtri_(uplo, diag, n,
A, lda, info);
560 const int *n,
const int *k,
const double *alpha,
561 const double *
A,
const int *lda,
562 const double *beta,
double *C,
const int *ldc) {
564 clock_t start = clock();
565 dsyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
566 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
569 dsyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
575 const int *m,
const int *n,
const double *alpha,
576 const double *
A,
const int *lda,
577 const double *
B,
const int *ldb,
579 double *C,
const int *ldc) {
581 clock_t start = clock();
582 dsymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
583 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
586 dsymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
592 const double *
A,
const int *lda,
593 const double *anorm,
double *rcond,
594 double *work,
int *iwork,
int *info) {
596 clock_t start = clock();
597 dpocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
598 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
601 dpocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
607 const int *n,
double *d,
double *e,
609 const double *vu,
const int *il,
const int *iu,
610 const double *abstol,
int *m,
double *w,
612 const int *ldz,
double *work,
int *iwork,
613 int *ifail,
int *info) {
615 clock_t start = clock();
616 dstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
617 work, iwork, ifail, info);
618 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
621 dstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
622 work, iwork, ifail, info);
628 const int *n,
double *d,
double *e,
629 const double *vl,
const double *vu,
630 const int *il,
const int *iu,
631 const double *abstol,
633 double *z,
const int *ldz,
int* isuppz,
634 double *work,
int* lwork,
635 int *iwork,
int* liwork,
int *info) {
637 clock_t start = clock();
638 dstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
639 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
640 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
643 dstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
644 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
651 inline void syev<double>(
const char *jobz,
const char *uplo,
const int *n,
652 double *a,
const int *lda,
double *w,
653 double *work,
const int *lwork,
int *info) {
655 clock_t start = clock();
656 dsyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
657 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
660 dsyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
668 const double *alpha,
const double *
A,
670 const double *x,
const int *incx,
671 const double *beta,
double *y,
const int *incy) {
673 clock_t start = clock();
674 dgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
675 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
678 dgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
684 const double *alpha,
const double *
A,
685 const int *lda,
const double *x,
686 const int *incx,
const double *beta,
687 double *y,
const int *incy) {
689 clock_t start = clock();
690 dsymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
691 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
694 dsymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
700 const char *diag,
const int *n,
701 const double *
A,
const int *lda,
702 double *x,
const int *incx) {
704 clock_t start = clock();
705 dtrmv_(uplo, trans, diag, n,
A, lda, x, incx);
706 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
709 dtrmv_(uplo, trans, diag, n,
A, lda, x, incx);
719 clock_t start = clock();
721 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
729 inline double dot<double>(
const int* n,
const double* dx,
const int* incx,
730 const double* dy,
const int* incy) {
733 clock_t start = clock();
734 tmp =
ddot_(n, dx, incx, dy, incy);
735 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
738 tmp =
ddot_(n, dx, incx, dy, incy);
744 inline void axpy<double>(
const int* n,
const double* da,
const double* dx,
745 const int* incx,
double* dy,
const int* incy) {
747 clock_t start = clock();
748 daxpy_(n, da, dx, incx, dy, incy);
749 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
752 daxpy_(n, da, dx, incx, dy, incy);
760 const int *n,
const int *k,
const int *l,
762 const float *
A,
const int *lda,
763 const float *
B,
const int *ldb,
765 float *C,
const int *ldc) {
767 clock_t start = clock();
768 sgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
769 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
772 sgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
778 float* ap,
int *info) {
780 clock_t start = clock();
782 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
792 float* ap,
const float *bp,
int *info) {
794 clock_t start = clock();
795 sspgst_(itype,uplo,n,ap,bp,info);
796 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
799 sspgst_(itype,uplo,n,ap,bp,info);
806 float* ap,
int *info) {
808 clock_t start = clock();
810 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
820 const char *diag,
const int *m,
const int *n,
822 const float *
A,
const int *lda,
823 float *
B,
const int *ldb) {
825 clock_t start = clock();
826 strmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
827 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
830 strmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
836 const char *uplo,
const int *n,
837 float *
A,
const int *lda,
838 float *
B,
const int *ldb,
839 float* w,
float* work,
840 const int *lwork,
int *info) {
842 clock_t start = clock();
843 ssygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
844 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
847 ssygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
853 const int *n,
float *
A,
const int *lda,
854 float *
B,
const int *ldb,
float *alphar,
855 float *alphai,
float *beta,
float *vl,
856 const int *ldvl,
float *vr,
const int *ldvr,
857 float *work,
const int *lwork,
int *info) {
859 clock_t start = clock();
860 sggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
861 ldvl, vr, ldvr, work, lwork, info);
862 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
865 sggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
866 ldvl, vr, ldvr, work, lwork, info);
873 const int *lda,
int *info) {
875 clock_t start = clock();
877 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
885 inline void trtri<float>(
const char *uplo,
const char *diag,
const int *n,
886 float *
A,
const int *lda,
int *info) {
888 clock_t start = clock();
889 strtri_(uplo, diag, n,
A, lda, info);
890 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
893 strtri_(uplo, diag, n,
A, lda, info);
899 const int *n,
const int *k,
const float *alpha,
900 const float *
A,
const int *lda,
901 const float *beta,
float *C,
const int *ldc) {
903 clock_t start = clock();
904 ssyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
905 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
908 ssyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
914 const int *m,
const int *n,
const float *alpha,
915 const float *
A,
const int *lda,
916 const float *
B,
const int *ldb,
918 float *C,
const int *ldc) {
920 clock_t start = clock();
921 ssymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
922 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
925 ssymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
931 const float *
A,
const int *lda,
932 const float *anorm,
float *rcond,
933 float *work,
int *iwork,
int *info) {
935 clock_t start = clock();
936 spocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
937 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
940 spocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
946 const int *n,
float *d,
float *e,
948 const float *vu,
const int *il,
const int *iu,
949 const float *abstol,
int *m,
float *w,
951 const int *ldz,
float *work,
int *iwork,
952 int *ifail,
int *info) {
954 clock_t start = clock();
955 sstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
956 work, iwork, ifail, info);
957 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
960 sstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
961 work, iwork, ifail, info);
967 const int *n,
float *d,
float *e,
968 const float *vl,
const float *vu,
969 const int *il,
const int *iu,
972 float *z,
const int *ldz,
int* isuppz,
973 float *work,
int* lwork,
974 int *iwork,
int* liwork,
int *info) {
976 clock_t start = clock();
977 sstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
978 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
979 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
982 sstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
983 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
988 inline void syev<float>(
const char *jobz,
const char *uplo,
const int *n,
989 float *a,
const int *lda,
float *w,
990 float *work,
const int *lwork,
int *info) {
992 clock_t start = clock();
993 ssyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
994 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
997 ssyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
1005 const float *alpha,
const float *
A,
1007 const float *x,
const int *incx,
1008 const float *beta,
float *y,
const int *incy) {
1010 clock_t start = clock();
1011 sgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
1012 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1015 sgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
1021 const float *alpha,
const float *
A,
1022 const int *lda,
const float *x,
1023 const int *incx,
const float *beta,
1024 float *y,
const int *incy) {
1026 clock_t start = clock();
1027 ssymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
1028 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1031 ssymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
1037 const char *diag,
const int *n,
1038 const float *
A,
const int *lda,
1039 float *x,
const int *incx) {
1041 clock_t start = clock();
1042 strmv_(uplo, trans, diag, n,
A, lda, x, incx);
1043 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1046 strmv_(uplo, trans, diag, n,
A, lda, x, incx);
1055 clock_t start = clock();
1057 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1067 inline float dot<float>(
const int* n,
const float* dx,
const int* incx,
1068 const float* dy,
const int* incy) {
1071 clock_t start = clock();
1072 sdot_(n, dx, incx, dy, incy);
1073 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1076 sdot_(n, dx, incx, dy, incy);
1083 inline void axpy<float>(
const int* n,
const float* da,
const float* dx,
1084 const int* incx,
float* dy,
const int* incy) {
1086 clock_t start = clock();
1087 saxpy_(n, da, dx, incx, dy, incy);
1088 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1091 saxpy_(n, da, dx, incx, dy, incy);
1108 template<
class Treal>
1109 static void fulltopacked(
const Treal* full, Treal* packed,
const int size){
1111 for (
int col=0;col<size;col++)
1113 for(
int row=0;row<=col;row++)
1115 packed[pind]=full[col*size+row];
1121 template<
class Treal>
1122 static void packedtofull(
const Treal* packed, Treal* full,
const int size){
1123 int psize=(size+1)*size/2;
1126 for(
int pind=0;pind<psize;pind++)
1130 full[col*size+row]=packed[pind];
1136 full[col*size+row]=packed[pind];
1137 full[row*size+col]=packed[pind];
1143 template<
class Treal>
1146 int psize=(size+1)*size/2;
1149 for(
int pind=0;pind<psize;pind++)
1153 full[col*size+row]=packed[pind];
1159 full[col*size+row]=packed[pind];
1160 full[row*size+col]=0;
1166 template<
class Treal>
1168 for(
int col = 0; col < size - 1; col++)
1169 for(
int row = col + 1; row < size; row++)
1170 trifull[col * size + row] = 0;