Go to the documentation of this file.
45 #ifndef MAT_GBLAS_HEADER
46 #define MAT_GBLAS_HEADER
55 #ifdef USE_SSE_INTRINSICS
61 extern "C" void dgemm_(
const char *ta,
const char *tb,
62 const int *n,
const int *k,
const int *l,
63 const double *alpha,
const double *
A,
const int *lda,
64 const double *
B,
const int *ldb,
65 const double *beta,
double *C,
const int *ldc);
66 extern "C" void dpptrf_(
const char *uplo,
const int *n,
double* ap,
int *info);
67 extern "C" void dspgst_(
const int *itype,
const char *uplo,
const int *n,
68 double* ap,
const double *bp,
int *info);
69 extern "C" void dtptri_(
const char *uplo,
const char *diag,
const int *n,
70 double* ap,
int *info);
73 extern "C" void dtrmm_(
const char *
side,
const char *uplo,
const char *transa,
74 const char *diag,
const int *m,
const int *n,
75 const double *alpha,
const double *
A,
const int *lda,
76 double *
B,
const int *ldb);
77 extern "C" void dsygv_(
const int *itype,
const char *jobz,
78 const char *uplo,
const int *n,
79 double *
A,
const int *lda,
double *
B,
const int *ldb,
80 double* w,
double* work,
const int *lwork,
int *info);
81 extern "C" void dggev_(
const char *jobbl,
const char *jobvr,
const int *n,
82 double *
A,
const int *lda,
double *
B,
const int *ldb,
83 double *alphar,
double *alphai,
double *beta,
84 double *vl,
const int *ldvl,
85 double *vr,
const int *ldvr,
86 double *work,
const int *lwork,
int *info);
87 extern "C" void dpotrf_(
const char *uplo,
const int *n,
double *
A,
88 const int *lda,
int *info);
89 extern "C" void dtrtri_(
const char *uplo,
const char *diag,
const int *n,
90 double *
A,
const int *lda,
int *info);
91 extern "C" void dsyrk_(
const char *uplo,
const char *trans,
const int *n,
92 const int *k,
const double *alpha,
const double *
A,
93 const int *lda,
const double *beta,
94 double *C,
const int *ldc);
95 extern "C" void dsymm_(
const char *
side,
const char *uplo,
96 const int *m,
const int *n,
97 const double *alpha,
const double *
A,
const int *lda,
98 const double *
B,
const int *ldb,
const double* beta,
99 double *C,
const int *ldc);
100 extern "C" void dpocon_(
const char *uplo,
const int *n,
const double *
A,
101 const int *lda,
const double *anorm,
double *rcond,
102 double *work,
int *iwork,
int *info);
103 extern "C" void dstevx_(
const char *jobz,
const char *range,
const int *n,
104 double *d,
double *e,
const double *vl,
105 const double *vu,
const int *il,
const int *iu,
106 const double *abstol,
int *m,
double *w,
double *z,
107 const int *ldz,
double *work,
int *iwork,
int *ifail,
109 extern "C" void dstevr_(
const char *jobz,
const char *range,
const int *n,
110 double *d,
double *e,
const double *vl,
111 const double *vu,
const int *il,
const int *iu,
112 const double *abstol,
int *m,
double *w,
double *z,
113 const int *ldz,
int* isuppz,
double *work,
int* lwork,
114 int *iwork,
int* liwork,
int *info);
115 extern "C" void dsyev_(
const char *jobz,
const char *uplo,
const int *n,
116 double *a,
const int *lda,
double *w,
double *work,
117 const int *lwork,
int *info);
120 extern "C" void dgemv_(
const char *ta,
const int *m,
const int *n,
121 const double *alpha,
const double *
A,
const int *lda,
122 const double *x,
const int *incx,
const double *beta,
123 double *y,
const int *incy);
124 extern "C" void dsymv_(
const char *uplo,
const int *n,
125 const double *alpha,
const double *
A,
const int *lda,
126 const double *x,
const int *incx,
const double *beta,
127 double *y,
const int *incy);
128 extern "C" void dtrmv_(
const char *uplo,
const char *trans,
const char *diag,
129 const int *n,
const double *
A,
const int *lda,
130 double *x,
const int *incx);
132 extern "C" void dscal_(
const int* n,
const double* da,
double* dx,
134 extern "C" double ddot_(
const int* n,
const double* dx,
const int* incx,
135 const double* dy,
const int* incy);
136 extern "C" void daxpy_(
const int* n,
const double* da,
const double* dx,
137 const int* incx,
double* dy,
const int* incy);
141 extern "C" void sgemm_(
const char *ta,
const char *tb,
142 const int *n,
const int *k,
const int *l,
143 const float *alpha,
const float *
A,
const int *lda,
144 const float *
B,
const int *ldb,
145 const float *beta,
float *C,
const int *ldc);
146 extern "C" void spptrf_(
const char *uplo,
const int *n,
float* ap,
int *info);
147 extern "C" void sspgst_(
const int *itype,
const char *uplo,
const int *n,
148 float* ap,
const float *bp,
int *info);
149 extern "C" void stptri_(
const char *uplo,
const char *diag,
const int *n,
150 float* ap,
int *info);
153 extern "C" void strmm_(
const char *
side,
const char *uplo,
const char *transa,
154 const char *diag,
const int *m,
const int *n,
155 const float *alpha,
const float *
A,
const int *lda,
156 float *
B,
const int *ldb);
157 extern "C" void ssygv_(
const int *itype,
const char *jobz,
158 const char *uplo,
const int *n,
159 float *
A,
const int *lda,
float *
B,
const int *ldb,
160 float* w,
float* work,
const int *lwork,
int *info);
161 extern "C" void sggev_(
const char *jobbl,
const char *jobvr,
const int *n,
162 float *
A,
const int *lda,
float *
B,
const int *ldb,
163 float *alphar,
float *alphai,
float *beta,
164 float *vl,
const int *ldvl,
165 float *vr,
const int *ldvr,
166 float *work,
const int *lwork,
int *info);
167 extern "C" void spotrf_(
const char *uplo,
const int *n,
float *
A,
168 const int *lda,
int *info);
169 extern "C" void strtri_(
const char *uplo,
const char *diag,
const int *n,
170 float *
A,
const int *lda,
int *info);
171 extern "C" void ssyrk_(
const char *uplo,
const char *trans,
const int *n,
172 const int *k,
const float *alpha,
const float *
A,
173 const int *lda,
const float *beta,
174 float *C,
const int *ldc);
176 const int *m,
const int *n,
177 const float *alpha,
const float *
A,
const int *lda,
178 const float *
B,
const int *ldb,
const float* beta,
179 float *C,
const int *ldc);
180 extern "C" void spocon_(
const char *uplo,
const int *n,
const float *
A,
181 const int *lda,
const float *anorm,
float *rcond,
182 float *work,
int *iwork,
int *info);
183 extern "C" void sstevx_(
const char *jobz,
const char *range,
const int *n,
184 float *d,
float *e,
const float *vl,
185 const float *vu,
const int *il,
const int *iu,
186 const float *abstol,
int *m,
float *w,
float *z,
187 const int *ldz,
float *work,
int *iwork,
int *ifail,
189 extern "C" void sstevr_(
const char *jobz,
const char *range,
const int *n,
190 float *d,
float *e,
const float *vl,
191 const float *vu,
const int *il,
const int *iu,
192 const float *abstol,
int *m,
float *w,
float *z,
193 const int *ldz,
int* isuppz,
float *work,
int* lwork,
194 int *iwork,
int* liwork,
int *info);
195 extern "C" void ssyev_(
const char *jobz,
const char *uplo,
const int *n,
196 float *a,
const int *lda,
float *w,
float *work,
197 const int *lwork,
int *info);
200 extern "C" void sgemv_(
const char *ta,
const int *m,
const int *n,
201 const float *alpha,
const float *
A,
const int *lda,
202 const float *x,
const int *incx,
const float *beta,
203 float *y,
const int *incy);
204 extern "C" void ssymv_(
const char *uplo,
const int *n,
205 const float *alpha,
const float *
A,
const int *lda,
206 const float *x,
const int *incx,
const float *beta,
207 float *y,
const int *incy);
208 extern "C" void strmv_(
const char *uplo,
const char *trans,
const char *diag,
209 const int *n,
const float *
A,
const int *lda,
210 float *x,
const int *incx);
212 extern "C" void sscal_(
const int* n,
const float* da,
float* dx,
217 extern "C" double sdot_(
const int* n,
const float* dx,
const int* incx,
218 const float* dy,
const int* incy);
220 extern "C" void saxpy_(
const int* n,
const float* da,
const float* dx,
221 const int* incx,
float* dy,
const int* incy);
232 inline static void gemm(
const char *ta,
const char *tb,
233 const int *n,
const int *k,
const int *l,
234 const T *alpha,
const T *
A,
const int *lda,
235 const T *
B,
const int *ldb,
236 const T *beta,T *C,
const int *ldc) {
237 #ifdef USE_SSE_INTRINSICS
238 if (*ta ==
'N' && *tb ==
'N' && *n == 32 && *k == 32 && *l == 32 && *alpha == 1.0 && *beta == 1) {
242 int pack_max_size = 10000;
243 if ( (pack_max_size*
sizeof(T))%16 )
244 throw std::runtime_error(
"In gblas gemm: requested buffer size not multiple of 16 bytes");
246 Memory_buffer_thread::instance().get_buffer(pack_max_size*3, buffer);
248 B_packed = buffer + pack_max_size;
249 C_packed = buffer + 2*pack_max_size;
250 gemm_sse<T>(
A,
B,C,32,32,32,
251 A_packed, B_packed, C_packed,
252 pack_max_size, pack_max_size, pack_max_size);
256 template_blas_gemm(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
263 inline static void pptrf(
const char *uplo,
const int *n, T* ap,
int *info) {
268 inline static void spgst(
const int *itype,
const char *uplo,
const int *n,
269 T* ap,
const T *bp,
int *info) {
275 inline static void tptri(
const char *uplo,
const char *diag,
const int *n,
281 inline static void trmm(
const char *
side,
const char *uplo,
282 const char *transa,
const char *diag,
283 const int *m,
const int *n,
284 const T *alpha,
const T *
A,
const int *lda,
285 T *
B,
const int *ldb) {
286 template_blas_trmm(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
293 inline static void sygv(
const int *itype,
const char *jobz,
294 const char *uplo,
const int *n,
295 T *
A,
const int *lda,T *
B,
const int *ldb,
296 T* w,T* work,
const int *lwork,
int *info) {
297 template_lapack_sygv(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
301 inline static void ggev(
const char *jobbl,
const char *jobvr,
302 const int *n, T *
A,
const int *lda,
303 T *
B,
const int *ldb, T *alphar,
304 T *alphai, T *beta, T *vl,
305 const int *ldvl, T *vr,
const int *ldvr,
306 T *work,
const int *lwork,
int *info) {
307 template_lapack_ggev(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
308 ldvl, vr, ldvr, work, lwork, info);
314 inline static void potrf(
const char *uplo,
const int *n, T *
A,
315 const int *lda,
int *info) {
321 inline static void trtri(
const char *uplo,
const char *diag,
const int *n,
322 T *
A,
const int *lda,
int *info) {
326 uploCopy[0] = uplo[0];
328 diagCopy[0] = diag[0];
334 inline static void syrk(
const char *uplo,
const char *trans,
const int *n,
335 const int *k,
const T *alpha,
const T *
A,
336 const int *lda,
const T *beta,
337 T *C,
const int *ldc) {
342 inline static void symm(
const char *
side,
const char *uplo,
343 const int *m,
const int *n,
344 const T *alpha,
const T *
A,
const int *lda,
345 const T *
B,
const int *ldb,
const T* beta,
346 T *C,
const int *ldc) {
347 template_blas_symm(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
351 inline static void pocon(
const char *uplo,
const int *n,
const T *
A,
352 const int *lda,
const T *anorm, T *rcond,
353 T *work,
int *iwork,
int *info) {
358 inline static void stevx(
const char *jobz,
const char *range,
359 const int *n, T *d, T *e,
const T *vl,
360 const T *vu,
const int *il,
const int *iu,
361 const T *abstol,
int *m, T *w, T *z,
362 const int *ldz, T *work,
int *iwork,
int *ifail,
364 template_lapack_stevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
365 work, iwork, ifail, info);
369 inline static void stevr(
const char *jobz,
const char *range,
const int *n,
370 T *d, T *e,
const T *vl,
371 const T *vu,
const int *il,
const int *iu,
372 const T *abstol,
int *m, T *w, T *z,
373 const int *ldz,
int* isuppz, T *work,
int* lwork,
374 int *iwork,
int* liwork,
int *info) {
375 template_lapack_stevr(jobz, range, n, d, e, vl, vu, il, iu, abstol,
376 m, w, z, ldz, isuppz,
377 work, lwork, iwork, liwork, info);
382 inline static void syev(
const char *jobz,
const char *uplo,
const int *n,
383 T *a,
const int *lda, T *w, T *work,
384 const int *lwork,
int *info) {
391 inline static void gemv(
const char *ta,
const int *m,
const int *n,
392 const T *alpha,
const T *
A,
394 const T *x,
const int *incx,
395 const T *beta, T *y,
const int *incy) {
396 template_blas_gemv(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
400 inline static void symv(
const char *uplo,
const int *n,
401 const T *alpha,
const T *
A,
402 const int *lda,
const T *x,
403 const int *incx,
const T *beta,
404 T *y,
const int *incy) {
409 inline static void trmv(
const char *uplo,
const char *trans,
410 const char *diag,
const int *n,
411 const T *
A,
const int *lda,
412 T *x,
const int *incx) {
419 inline static void scal(
const int* n,
const T* da, T* dx,
425 inline static T
dot(
const int* n,
const T* dx,
const int* incx,
426 const T* dy,
const int* incy) {
431 inline static void axpy(
const int* n,
const T* da,
const T* dx,
432 const int* incx, T* dy,
const int* incy) {
442 #ifndef USE_LINALG_TEMPLATES
448 const int *n,
const int *k,
const int *l,
450 const double *
A,
const int *lda,
451 const double *
B,
const int *ldb,
453 double *C,
const int *ldc) {
455 clock_t start = clock();
456 dgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
457 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
460 dgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
466 double* ap,
int *info) {
468 clock_t start = clock();
470 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
480 double* ap,
const double *bp,
int *info) {
482 clock_t start = clock();
483 dspgst_(itype,uplo,n,ap,bp,info);
484 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
487 dspgst_(itype,uplo,n,ap,bp,info);
493 double* ap,
int *info) {
495 clock_t start = clock();
497 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
507 const char *diag,
const int *m,
const int *n,
509 const double *
A,
const int *lda,
510 double *
B,
const int *ldb) {
512 clock_t start = clock();
513 dtrmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
514 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
517 dtrmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
523 const char *uplo,
const int *n,
524 double *
A,
const int *lda,
525 double *
B,
const int *ldb,
526 double* w,
double* work,
527 const int *lwork,
int *info) {
529 clock_t start = clock();
530 dsygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
531 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
534 dsygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
540 const int *n,
double *
A,
const int *lda,
541 double *
B,
const int *ldb,
double *alphar,
542 double *alphai,
double *beta,
double *vl,
543 const int *ldvl,
double *vr,
const int *ldvr,
544 double *work,
const int *lwork,
int *info) {
546 clock_t start = clock();
547 dggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
548 ldvl, vr, ldvr, work, lwork, info);
549 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
552 dggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
553 ldvl, vr, ldvr, work, lwork, info);
560 const int *lda,
int *info) {
562 clock_t start = clock();
564 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
573 double *
A,
const int *lda,
int *info) {
575 clock_t start = clock();
576 dtrtri_(uplo, diag, n,
A, lda, info);
577 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
580 dtrtri_(uplo, diag, n,
A, lda, info);
586 const int *n,
const int *k,
const double *alpha,
587 const double *
A,
const int *lda,
588 const double *beta,
double *C,
const int *ldc) {
590 clock_t start = clock();
591 dsyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
592 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
595 dsyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
601 const int *m,
const int *n,
const double *alpha,
602 const double *
A,
const int *lda,
603 const double *
B,
const int *ldb,
605 double *C,
const int *ldc) {
607 clock_t start = clock();
608 dsymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
609 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
612 dsymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
618 const double *
A,
const int *lda,
619 const double *anorm,
double *rcond,
620 double *work,
int *iwork,
int *info) {
622 clock_t start = clock();
623 dpocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
624 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
627 dpocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
633 const int *n,
double *d,
double *e,
635 const double *vu,
const int *il,
const int *iu,
636 const double *abstol,
int *m,
double *w,
638 const int *ldz,
double *work,
int *iwork,
639 int *ifail,
int *info) {
641 clock_t start = clock();
642 dstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
643 work, iwork, ifail, info);
644 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
647 dstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
648 work, iwork, ifail, info);
654 const int *n,
double *d,
double *e,
655 const double *vl,
const double *vu,
656 const int *il,
const int *iu,
657 const double *abstol,
659 double *z,
const int *ldz,
int* isuppz,
660 double *work,
int* lwork,
661 int *iwork,
int* liwork,
int *info) {
663 clock_t start = clock();
664 dstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
665 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
666 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
669 dstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
670 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
677 inline void syev<double>(
const char *jobz,
const char *uplo,
const int *n,
678 double *a,
const int *lda,
double *w,
679 double *work,
const int *lwork,
int *info) {
681 clock_t start = clock();
682 dsyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
683 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
686 dsyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
694 const double *alpha,
const double *
A,
696 const double *x,
const int *incx,
697 const double *beta,
double *y,
const int *incy) {
699 clock_t start = clock();
700 dgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
701 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
704 dgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
710 const double *alpha,
const double *
A,
711 const int *lda,
const double *x,
712 const int *incx,
const double *beta,
713 double *y,
const int *incy) {
715 clock_t start = clock();
716 dsymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
717 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
720 dsymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
726 const char *diag,
const int *n,
727 const double *
A,
const int *lda,
728 double *x,
const int *incx) {
730 clock_t start = clock();
731 dtrmv_(uplo, trans, diag, n,
A, lda, x, incx);
732 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
735 dtrmv_(uplo, trans, diag, n,
A, lda, x, incx);
745 clock_t start = clock();
747 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
755 inline double dot<double>(
const int* n,
const double* dx,
const int* incx,
756 const double* dy,
const int* incy) {
759 clock_t start = clock();
760 tmp =
ddot_(n, dx, incx, dy, incy);
761 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
764 tmp =
ddot_(n, dx, incx, dy, incy);
770 inline void axpy<double>(
const int* n,
const double* da,
const double* dx,
771 const int* incx,
double* dy,
const int* incy) {
773 clock_t start = clock();
774 daxpy_(n, da, dx, incx, dy, incy);
775 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
778 daxpy_(n, da, dx, incx, dy, incy);
786 const int *n,
const int *k,
const int *l,
788 const float *
A,
const int *lda,
789 const float *
B,
const int *ldb,
791 float *C,
const int *ldc) {
793 clock_t start = clock();
794 sgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
795 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
798 sgemm_(ta,tb,n,k,l,alpha,
A,lda,
B,ldb,beta,C,ldc);
804 float* ap,
int *info) {
806 clock_t start = clock();
808 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
818 float* ap,
const float *bp,
int *info) {
820 clock_t start = clock();
821 sspgst_(itype,uplo,n,ap,bp,info);
822 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
825 sspgst_(itype,uplo,n,ap,bp,info);
832 float* ap,
int *info) {
834 clock_t start = clock();
836 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
846 const char *diag,
const int *m,
const int *n,
848 const float *
A,
const int *lda,
849 float *
B,
const int *ldb) {
851 clock_t start = clock();
852 strmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
853 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
856 strmm_(
side,uplo,transa,diag,m,n,alpha,
A,lda,
B,ldb);
862 const char *uplo,
const int *n,
863 float *
A,
const int *lda,
864 float *
B,
const int *ldb,
865 float* w,
float* work,
866 const int *lwork,
int *info) {
868 clock_t start = clock();
869 ssygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
870 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
873 ssygv_(itype,jobz,uplo,n,
A,lda,
B,ldb,w,work,lwork,info);
879 const int *n,
float *
A,
const int *lda,
880 float *
B,
const int *ldb,
float *alphar,
881 float *alphai,
float *beta,
float *vl,
882 const int *ldvl,
float *vr,
const int *ldvr,
883 float *work,
const int *lwork,
int *info) {
885 clock_t start = clock();
886 sggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
887 ldvl, vr, ldvr, work, lwork, info);
888 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
891 sggev_(jobbl, jobvr, n,
A, lda,
B, ldb, alphar, alphai, beta, vl,
892 ldvl, vr, ldvr, work, lwork, info);
899 const int *lda,
int *info) {
901 clock_t start = clock();
903 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
911 inline void trtri<float>(
const char *uplo,
const char *diag,
const int *n,
912 float *
A,
const int *lda,
int *info) {
914 clock_t start = clock();
915 strtri_(uplo, diag, n,
A, lda, info);
916 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
919 strtri_(uplo, diag, n,
A, lda, info);
925 const int *n,
const int *k,
const float *alpha,
926 const float *
A,
const int *lda,
927 const float *beta,
float *C,
const int *ldc) {
929 clock_t start = clock();
930 ssyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
931 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
934 ssyrk_(uplo, trans, n, k, alpha,
A, lda, beta, C, ldc);
940 const int *m,
const int *n,
const float *alpha,
941 const float *
A,
const int *lda,
942 const float *
B,
const int *ldb,
944 float *C,
const int *ldc) {
946 clock_t start = clock();
947 ssymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
948 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
951 ssymm_(
side, uplo, m, n, alpha,
A, lda,
B, ldb, beta, C, ldc);
957 const float *
A,
const int *lda,
958 const float *anorm,
float *rcond,
959 float *work,
int *iwork,
int *info) {
961 clock_t start = clock();
962 spocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
963 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
966 spocon_(uplo, n,
A, lda, anorm, rcond, work, iwork, info);
972 const int *n,
float *d,
float *e,
974 const float *vu,
const int *il,
const int *iu,
975 const float *abstol,
int *m,
float *w,
977 const int *ldz,
float *work,
int *iwork,
978 int *ifail,
int *info) {
980 clock_t start = clock();
981 sstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
982 work, iwork, ifail, info);
983 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
986 sstevx_(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz,
987 work, iwork, ifail, info);
993 const int *n,
float *d,
float *e,
994 const float *vl,
const float *vu,
995 const int *il,
const int *iu,
998 float *z,
const int *ldz,
int* isuppz,
999 float *work,
int* lwork,
1000 int *iwork,
int* liwork,
int *info) {
1002 clock_t start = clock();
1003 sstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
1004 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
1005 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1008 sstevr_(jobz, range, n, d, e, vl, vu, il, iu, abstol,
1009 m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info);
1014 inline void syev<float>(
const char *jobz,
const char *uplo,
const int *n,
1015 float *a,
const int *lda,
float *w,
1016 float *work,
const int *lwork,
int *info) {
1018 clock_t start = clock();
1019 ssyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
1020 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1023 ssyev_(jobz, uplo, n, a, lda, w, work, lwork, info);
1031 const float *alpha,
const float *
A,
1033 const float *x,
const int *incx,
1034 const float *beta,
float *y,
const int *incy) {
1036 clock_t start = clock();
1037 sgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
1038 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1041 sgemv_(ta, m, n, alpha,
A, lda, x, incx, beta, y, incy);
1047 const float *alpha,
const float *
A,
1048 const int *lda,
const float *x,
1049 const int *incx,
const float *beta,
1050 float *y,
const int *incy) {
1052 clock_t start = clock();
1053 ssymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
1054 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1057 ssymv_(uplo, n, alpha,
A, lda, x, incx, beta, y, incy);
1063 const char *diag,
const int *n,
1064 const float *
A,
const int *lda,
1065 float *x,
const int *incx) {
1067 clock_t start = clock();
1068 strmv_(uplo, trans, diag, n,
A, lda, x, incx);
1069 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1072 strmv_(uplo, trans, diag, n,
A, lda, x, incx);
1081 clock_t start = clock();
1083 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1093 inline float dot<float>(
const int* n,
const float* dx,
const int* incx,
1094 const float* dy,
const int* incy) {
1097 clock_t start = clock();
1098 sdot_(n, dx, incx, dy, incy);
1099 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1102 sdot_(n, dx, incx, dy, incy);
1109 inline void axpy<float>(
const int* n,
const float* da,
const float* dx,
1110 const int* incx,
float* dy,
const int* incy) {
1112 clock_t start = clock();
1113 saxpy_(n, da, dx, incx, dy, incy);
1114 Gblas::time += ((float)(clock() - start)) / (CLOCKS_PER_SEC);
1117 saxpy_(n, da, dx, incx, dy, incy);
1134 template<
class Treal>
1135 static void fulltopacked(
const Treal* full, Treal* packed,
const int size){
1137 for (
int col=0;col<size;col++)
1139 for(
int row=0;row<=col;row++)
1141 packed[pind]=full[col*size+row];
1147 template<
class Treal>
1148 static void packedtofull(
const Treal* packed, Treal* full,
const int size){
1149 int psize=(size+1)*size/2;
1152 for(
int pind=0;pind<psize;pind++)
1156 full[col*size+row]=packed[pind];
1162 full[col*size+row]=packed[pind];
1163 full[row*size+col]=packed[pind];
1169 template<
class Treal>
1172 int psize=(size+1)*size/2;
1175 for(
int pind=0;pind<psize;pind++)
1179 full[col*size+row]=packed[pind];
1185 full[col*size+row]=packed[pind];
1186 full[row*size+col]=0;
1192 template<
class Treal>
1194 for(
int col = 0; col < size - 1; col++)
1195 for(
int row = col + 1; row < size; row++)
1196 trifull[col * size + row] = 0;
void ssymv_(const char *uplo, const int *n, const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *beta, float *y, const int *incy)
void scal< float >(const int *n, const float *da, float *dx, const int *incx)
Definition: mat_gblas.h:1078
void syrk< float >(const char *uplo, const char *trans, const int *n, const int *k, const float *alpha, const float *A, const int *lda, const float *beta, float *C, const int *ldc)
Definition: mat_gblas.h:924
static void axpy(const int *n, const T *da, const T *dx, const int *incx, T *dy, const int *incy)
Definition: mat_gblas.h:431
void sspgst_(const int *itype, const char *uplo, const int *n, float *ap, const float *bp, int *info)
void trtri< float >(const char *uplo, const char *diag, const int *n, float *A, const int *lda, int *info)
Definition: mat_gblas.h:911
void dgemm_(const char *ta, const char *tb, const int *n, const int *k, const int *l, const double *alpha, const double *A, const int *lda, const double *B, const int *ldb, const double *beta, double *C, const int *ldc)
void dtptri_(const char *uplo, const char *diag, const int *n, double *ap, int *info)
static void symv(const char *uplo, const int *n, const T *alpha, const T *A, const int *lda, const T *x, const int *incx, const T *beta, T *y, const int *incy)
Definition: mat_gblas.h:400
void gemm< float >(const char *ta, const char *tb, const int *n, const int *k, const int *l, const float *alpha, const float *A, const int *lda, const float *B, const int *ldb, const float *beta, float *C, const int *ldc)
Definition: mat_gblas.h:785
void stevx< double >(const char *jobz, const char *range, const int *n, double *d, double *e, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
Definition: mat_gblas.h:632
void dstevx_(const char *jobz, const char *range, const int *n, double *d, double *e, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
void dgemv_(const char *ta, const int *m, const int *n, const double *alpha, const double *A, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy)
void ggev< double >(const char *jobbl, const char *jobvr, const int *n, double *A, const int *lda, double *B, const int *ldb, double *alphar, double *alphai, double *beta, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
Definition: mat_gblas.h:539
void potrf< double >(const char *uplo, const int *n, double *A, const int *lda, int *info)
Definition: mat_gblas.h:559
void trtri< double >(const char *uplo, const char *diag, const int *n, double *A, const int *lda, int *info)
Definition: mat_gblas.h:572
static void stevr(const char *jobz, const char *range, const int *n, T *d, T *e, const T *vl, const T *vu, const int *il, const int *iu, const T *abstol, int *m, T *w, T *z, const int *ldz, int *isuppz, T *work, int *lwork, int *iwork, int *liwork, int *info)
Definition: mat_gblas.h:369
void gemm< double >(const char *ta, const char *tb, const int *n, const int *k, const int *l, const double *alpha, const double *A, const int *lda, const double *B, const int *ldb, const double *beta, double *C, const int *ldc)
Definition: mat_gblas.h:447
Treal template_blas_dot(const integer *n, const Treal *dx, const integer *incx, const Treal *dy, const integer *incy)
Definition: template_blas_dot.h:43
static void trmm(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const T *alpha, const T *A, const int *lda, T *B, const int *ldb)
Definition: mat_gblas.h:281
void sstevr_(const char *jobz, const char *range, const int *n, float *d, float *e, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info)
void pocon< double >(const char *uplo, const int *n, const double *A, const int *lda, const double *anorm, double *rcond, double *work, int *iwork, int *info)
Definition: mat_gblas.h:617
int template_blas_scal(const integer *n, const Treal *da, Treal *dx, const integer *incx)
Definition: template_blas_scal.h:43
void spotrf_(const char *uplo, const int *n, float *A, const int *lda, int *info)
static float time
Definition: mat_gblas.h:226
static void scal(const int *n, const T *da, T *dx, const int *incx)
Definition: mat_gblas.h:419
int template_blas_syrk(const char *uplo, const char *trans, const integer *n, const integer *k, const Treal *alpha, const Treal *a, const integer *lda, const Treal *beta, Treal *c__, const integer *ldc)
Definition: template_blas_syrk.h:42
void dscal_(const int *n, const double *da, double *dx, const int *incx)
void syev< float >(const char *jobz, const char *uplo, const int *n, float *a, const int *lda, float *w, float *work, const int *lwork, int *info)
Definition: mat_gblas.h:1014
side
Definition: Matrix.h:75
static void fulltopacked(const Treal *full, Treal *packed, const int size)
Definition: mat_gblas.h:1135
static void ggev(const char *jobbl, const char *jobvr, const int *n, T *A, const int *lda, T *B, const int *ldb, T *alphar, T *alphai, T *beta, T *vl, const int *ldvl, T *vr, const int *ldvr, T *work, const int *lwork, int *info)
Definition: mat_gblas.h:301
void dspgst_(const int *itype, const char *uplo, const int *n, double *ap, const double *bp, int *info)
static void gemv(const char *ta, const int *m, const int *n, const T *alpha, const T *A, const int *lda, const T *x, const int *incx, const T *beta, T *y, const int *incy)
Definition: mat_gblas.h:391
int template_lapack_potrf(const char *uplo, const integer *n, Treal *a, const integer *lda, integer *info)
Definition: template_lapack_potrf.h:43
int template_lapack_spgst(const integer *itype, const char *uplo, const integer *n, Treal *ap, const Treal *bp, integer *info)
Definition: template_lapack_spgst.h:43
static void packedtofull(const Treal *packed, Treal *full, const int size)
Definition: mat_gblas.h:1148
int template_lapack_trtri(const char *uplo, const char *diag, const integer *n, Treal *a, const integer *lda, integer *info)
Definition: template_lapack_trtri.h:42
void sggev_(const char *jobbl, const char *jobvr, const int *n, float *A, const int *lda, float *B, const int *ldb, float *alphar, float *alphai, float *beta, float *vl, const int *ldvl, float *vr, const int *ldvr, float *work, const int *lwork, int *info)
void dpocon_(const char *uplo, const int *n, const double *A, const int *lda, const double *anorm, double *rcond, double *work, int *iwork, int *info)
void tptri< float >(const char *uplo, const char *diag, const int *n, float *ap, int *info)
Definition: mat_gblas.h:830
static void trifulltofull(Treal *trifull, const int size)
Definition: mat_gblas.h:1193
void spgst< float >(const int *itype, const char *uplo, const int *n, float *ap, const float *bp, int *info)
Definition: mat_gblas.h:816
static void pptrf(const char *uplo, const int *n, T *ap, int *info)
Definition: mat_gblas.h:263
void sgemm_(const char *ta, const char *tb, const int *n, const int *k, const int *l, const float *alpha, const float *A, const int *lda, const float *B, const int *ldb, const float *beta, float *C, const int *ldc)
void trmm< double >(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const double *alpha, const double *A, const int *lda, double *B, const int *ldb)
Definition: mat_gblas.h:505
int template_blas_gemm(const char *transa, const char *transb, const integer *m, const integer *n, const integer *k, const Treal *alpha, const Treal *a, const integer *lda, const Treal *b, const integer *ldb, const Treal *beta, Treal *c__, const integer *ldc)
Definition: template_blas_gemm.h:43
void stevr< double >(const char *jobz, const char *range, const int *n, double *d, double *e, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info)
Definition: mat_gblas.h:653
double ddot_(const int *n, const double *dx, const int *incx, const double *dy, const int *incy)
void trmv< double >(const char *uplo, const char *trans, const char *diag, const int *n, const double *A, const int *lda, double *x, const int *incx)
Definition: mat_gblas.h:725
Code for managing aligned memory buffers, used if SSE intrinsics enabled.
int template_lapack_stevx(const char *jobz, const char *range, const integer *n, Treal *d__, Treal *e, const Treal *vl, const Treal *vu, const integer *il, const integer *iu, const Treal *abstol, integer *m, Treal *w, Treal *z__, const integer *ldz, Treal *work, integer *iwork, integer *ifail, integer *info)
Definition: template_lapack_stevx.h:42
void trmv< float >(const char *uplo, const char *trans, const char *diag, const int *n, const float *A, const int *lda, float *x, const int *incx)
Definition: mat_gblas.h:1062
int template_lapack_tptri(const char *uplo, const char *diag, const integer *n, Treal *ap, integer *info)
Definition: template_lapack_tptri.h:43
void pptrf< double >(const char *uplo, const int *n, double *ap, int *info)
Definition: mat_gblas.h:465
int template_lapack_syev(const char *jobz, const char *uplo, const integer *n, Treal *a, const integer *lda, Treal *w, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_syev.h:42
int template_blas_trmm(const char *side, const char *uplo, const char *transa, const char *diag, const integer *m, const integer *n, const Treal *alpha, const Treal *a, const integer *lda, Treal *b, const integer *ldb)
Definition: template_blas_trmm.h:43
void axpy< float >(const int *n, const float *da, const float *dx, const int *incx, float *dy, const int *incy)
Definition: mat_gblas.h:1109
void symv< float >(const char *uplo, const int *n, const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *beta, float *y, const int *incy)
Definition: mat_gblas.h:1046
static void tripackedtofull(const Treal *packed, Treal *full, const int size)
Definition: mat_gblas.h:1170
static void gemm(const char *ta, const char *tb, const int *n, const int *k, const int *l, const T *alpha, const T *A, const int *lda, const T *B, const int *ldb, const T *beta, T *C, const int *ldc)
Definition: mat_gblas.h:232
void stevr< float >(const char *jobz, const char *range, const int *n, float *d, float *e, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info)
Definition: mat_gblas.h:992
void pptrf< float >(const char *uplo, const int *n, float *ap, int *info)
Definition: mat_gblas.h:803
void dsygv_(const int *itype, const char *jobz, const char *uplo, const int *n, double *A, const int *lda, double *B, const int *ldb, double *w, double *work, const int *lwork, int *info)
static void pocon(const char *uplo, const int *n, const T *A, const int *lda, const T *anorm, T *rcond, T *work, int *iwork, int *info)
Definition: mat_gblas.h:351
void syrk< double >(const char *uplo, const char *trans, const int *n, const int *k, const double *alpha, const double *A, const int *lda, const double *beta, double *C, const int *ldc)
Definition: mat_gblas.h:585
void symm< float >(const char *side, const char *uplo, const int *m, const int *n, const float *alpha, const float *A, const int *lda, const float *B, const int *ldb, const float *beta, float *C, const int *ldc)
Definition: mat_gblas.h:939
static void tptri(const char *uplo, const char *diag, const int *n, T *ap, int *info)
Definition: mat_gblas.h:275
void strtri_(const char *uplo, const char *diag, const int *n, float *A, const int *lda, int *info)
void spocon_(const char *uplo, const int *n, const float *A, const int *lda, const float *anorm, float *rcond, float *work, int *iwork, int *info)
void strmv_(const char *uplo, const char *trans, const char *diag, const int *n, const float *A, const int *lda, float *x, const int *incx)
void symv< double >(const char *uplo, const int *n, const double *alpha, const double *A, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy)
Definition: mat_gblas.h:709
void saxpy_(const int *n, const float *da, const float *dx, const int *incx, float *dy, const int *incy)
int template_lapack_pocon(const char *uplo, const integer *n, const Treal *a, const integer *lda, const Treal *anorm, Treal *rcond, Treal *work, integer *iwork, integer *info)
Definition: template_lapack_pocon.h:42
void strmm_(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const float *alpha, const float *A, const int *lda, float *B, const int *ldb)
static void stevx(const char *jobz, const char *range, const int *n, T *d, T *e, const T *vl, const T *vu, const int *il, const int *iu, const T *abstol, int *m, T *w, T *z, const int *ldz, T *work, int *iwork, int *ifail, int *info)
Definition: mat_gblas.h:358
void dsymv_(const char *uplo, const int *n, const double *alpha, const double *A, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy)
int template_blas_symv(const char *uplo, const integer *n, const Treal *alpha, const Treal *a, const integer *lda, const Treal *x, const integer *incx, const Treal *beta, Treal *y, const integer *incy)
Definition: template_blas_symv.h:42
int template_blas_gemv(const char *trans, const integer *m, const integer *n, const Treal *alpha, const Treal *a, const integer *lda, const Treal *x, const integer *incx, const Treal *beta, Treal *y, const integer *incy)
Definition: template_blas_gemv.h:43
Definition: allocate.cc:39
void dsymm_(const char *side, const char *uplo, const int *m, const int *n, const double *alpha, const double *A, const int *lda, const double *B, const int *ldb, const double *beta, double *C, const int *ldc)
double dot< double >(const int *n, const double *dx, const int *incx, const double *dy, const int *incy)
Definition: mat_gblas.h:755
int template_blas_symm(const char *side, const char *uplo, const integer *m, const integer *n, const Treal *alpha, const Treal *a, const integer *lda, const Treal *b, const integer *ldb, const Treal *beta, Treal *c__, const integer *ldc)
Definition: template_blas_symm.h:42
void dtrtri_(const char *uplo, const char *diag, const int *n, double *A, const int *lda, int *info)
int template_blas_axpy(const integer *n, const Treal *da, const Treal *dx, const integer *incx, Treal *dy, const integer *incy)
Definition: template_blas_axpy.h:43
void axpy< double >(const int *n, const double *da, const double *dx, const int *incx, double *dy, const int *incy)
Definition: mat_gblas.h:770
void pocon< float >(const char *uplo, const int *n, const float *A, const int *lda, const float *anorm, float *rcond, float *work, int *iwork, int *info)
Definition: mat_gblas.h:956
void stptri_(const char *uplo, const char *diag, const int *n, float *ap, int *info)
void tptri< double >(const char *uplo, const char *diag, const int *n, double *ap, int *info)
Definition: mat_gblas.h:492
Generalized matrix matrix multiplication using SSE intrinsics.
static bool timekeeping
Definition: mat_gblas.h:227
int template_lapack_sygv(const integer *itype, const char *jobz, const char *uplo, const integer *n, Treal *a, const integer *lda, Treal *b, const integer *ldb, Treal *w, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_sygv.h:42
void sgemv_(const char *ta, const int *m, const int *n, const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *beta, float *y, const int *incy)
void symm< double >(const char *side, const char *uplo, const int *m, const int *n, const double *alpha, const double *A, const int *lda, const double *B, const int *ldb, const double *beta, double *C, const int *ldc)
Definition: mat_gblas.h:600
void potrf< float >(const char *uplo, const int *n, float *A, const int *lda, int *info)
Definition: mat_gblas.h:898
void trmm< float >(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const float *alpha, const float *A, const int *lda, float *B, const int *ldb)
Definition: mat_gblas.h:844
static void symm(const char *side, const char *uplo, const int *m, const int *n, const T *alpha, const T *A, const int *lda, const T *B, const int *ldb, const T *beta, T *C, const int *ldc)
Definition: mat_gblas.h:342
void dtrmm_(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const double *alpha, const double *A, const int *lda, double *B, const int *ldb)
void gemv< float >(const char *ta, const int *m, const int *n, const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *beta, float *y, const int *incy)
Definition: mat_gblas.h:1030
static void trmv(const char *uplo, const char *trans, const char *diag, const int *n, const T *A, const int *lda, T *x, const int *incx)
Definition: mat_gblas.h:409
static void sygv(const int *itype, const char *jobz, const char *uplo, const int *n, T *A, const int *lda, T *B, const int *ldb, T *w, T *work, const int *lwork, int *info)
Definition: mat_gblas.h:293
void sygv< float >(const int *itype, const char *jobz, const char *uplo, const int *n, float *A, const int *lda, float *B, const int *ldb, float *w, float *work, const int *lwork, int *info)
Definition: mat_gblas.h:861
void ssyev_(const char *jobz, const char *uplo, const int *n, float *a, const int *lda, float *w, float *work, const int *lwork, int *info)
int template_blas_trmv(const char *uplo, const char *trans, const char *diag, const integer *n, const Treal *a, const integer *lda, Treal *x, const integer *incx)
Definition: template_blas_trmv.h:42
int template_lapack_ggev(const char *jobvl, const char *jobvr, const integer *n, Treal *a, const integer *lda, Treal *b, const integer *ldb, Treal *alphar, Treal *alphai, Treal *beta, Treal *vl, const integer *ldvl, Treal *vr, const integer *ldvr, Treal *work, const integer *lwork, integer *info)
Definition: template_lapack_ggev.h:42
void spgst< double >(const int *itype, const char *uplo, const int *n, double *ap, const double *bp, int *info)
Definition: mat_gblas.h:478
void stevx< float >(const char *jobz, const char *range, const int *n, float *d, float *e, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, float *work, int *iwork, int *ifail, int *info)
Definition: mat_gblas.h:971
void ssymm_(const char *side, const char *uplo, const int *m, const int *n, const float *alpha, const float *A, const int *lda, const float *B, const int *ldb, const float *beta, float *C, const int *ldc)
void gemv< double >(const char *ta, const int *m, const int *n, const double *alpha, const double *A, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy)
Definition: mat_gblas.h:693
static void syrk(const char *uplo, const char *trans, const int *n, const int *k, const T *alpha, const T *A, const int *lda, const T *beta, T *C, const int *ldc)
Definition: mat_gblas.h:334
void ggev< float >(const char *jobbl, const char *jobvr, const int *n, float *A, const int *lda, float *B, const int *ldb, float *alphar, float *alphai, float *beta, float *vl, const int *ldvl, float *vr, const int *ldvr, float *work, const int *lwork, int *info)
Definition: mat_gblas.h:878
void scal< double >(const int *n, const double *da, double *dx, const int *incx)
Definition: mat_gblas.h:742
void ssyrk_(const char *uplo, const char *trans, const int *n, const int *k, const float *alpha, const float *A, const int *lda, const float *beta, float *C, const int *ldc)
void sstevx_(const char *jobz, const char *range, const int *n, float *d, float *e, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, float *work, int *iwork, int *ifail, int *info)
static void potrf(const char *uplo, const int *n, T *A, const int *lda, int *info)
Definition: mat_gblas.h:314
static void syev(const char *jobz, const char *uplo, const int *n, T *a, const int *lda, T *w, T *work, const int *lwork, int *info)
Definition: mat_gblas.h:382
void dpptrf_(const char *uplo, const int *n, double *ap, int *info)
void daxpy_(const int *n, const double *da, const double *dx, const int *incx, double *dy, const int *incy)
void dggev_(const char *jobbl, const char *jobvr, const int *n, double *A, const int *lda, double *B, const int *ldb, double *alphar, double *alphai, double *beta, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
void sscal_(const int *n, const float *da, float *dx, const int *incx)
void sygv< double >(const int *itype, const char *jobz, const char *uplo, const int *n, double *A, const int *lda, double *B, const int *ldb, double *w, double *work, const int *lwork, int *info)
Definition: mat_gblas.h:522
void syev< double >(const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *w, double *work, const int *lwork, int *info)
Definition: mat_gblas.h:677
The Failure class is used for exception handling. It inherits std::exception.
void ssygv_(const int *itype, const char *jobz, const char *uplo, const int *n, float *A, const int *lda, float *B, const int *ldb, float *w, float *work, const int *lwork, int *info)
void dsyrk_(const char *uplo, const char *trans, const int *n, const int *k, const double *alpha, const double *A, const int *lda, const double *beta, double *C, const int *ldc)
Definition: mat_gblas.h:225
static void spgst(const int *itype, const char *uplo, const int *n, T *ap, const T *bp, int *info)
Definition: mat_gblas.h:268
void dstevr_(const char *jobz, const char *range, const int *n, double *d, double *e, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info)
int template_lapack_stevr(const char *jobz, const char *range, const integer *n, Treal *d__, Treal *e, const Treal *vl, const Treal *vu, const integer *il, const integer *iu, const Treal *abstol, integer *m, Treal *w, Treal *z__, const integer *ldz, integer *isuppz, Treal *work, integer *lwork, integer *iwork, integer *liwork, integer *info)
Definition: template_lapack_stevr.h:41
void dtrmv_(const char *uplo, const char *trans, const char *diag, const int *n, const double *A, const int *lda, double *x, const int *incx)
int template_lapack_pptrf(const char *uplo, const integer *n, Treal *ap, integer *info)
Definition: template_lapack_pptrf.h:43
static void trtri(const char *uplo, const char *diag, const int *n, T *A, const int *lda, int *info)
Definition: mat_gblas.h:321
void dsyev_(const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *w, double *work, const int *lwork, int *info)
void dpotrf_(const char *uplo, const int *n, double *A, const int *lda, int *info)
void spptrf_(const char *uplo, const int *n, float *ap, int *info)
static T dot(const int *n, const T *dx, const int *incx, const T *dy, const int *incy)
Definition: mat_gblas.h:425