46 #ifndef _PEXSI_BLAS_HPP_
47 #define _PEXSI_BLAS_HPP_
58 typedef std::complex<float> scomplex;
59 typedef std::complex<double> dcomplex;
66 ( Int n,
float alpha,
const float* x, Int incx,
float* y, Int incy );
68 ( Int n,
double alpha,
const double* x, Int incx,
double* y, Int incy );
70 ( Int n, scomplex alpha,
const scomplex* x, Int incx, scomplex* y, Int incy );
72 ( Int n, dcomplex alpha,
const dcomplex* x, Int incx, dcomplex* y, Int incy );
74 void Axpy( Int n, T alpha,
const T* x, Int incx, T* y, Int incy );
76 void Copy( Int n,
const int* x, Int incx,
int* y, Int incy );
77 void Copy( Int n,
const float* x, Int incx,
float* y, Int incy );
78 void Copy( Int n,
const double* x, Int incx,
double* y, Int incy );
79 void Copy( Int n,
const scomplex* x, Int incx, scomplex* y, Int incy );
80 void Copy( Int n,
const dcomplex* x, Int incx, dcomplex* y, Int incy );
82 void Copy( Int n,
const T* x, Int incx, T* y, Int incy );
84 float Dot( Int n,
const float* x, Int incx,
const float* y, Int incy );
85 double Dot( Int n,
const double* x, Int incx,
const double* y, Int incy );
86 scomplex Dot( Int n,
const scomplex* x, Int incx,
const scomplex* y, Int incy );
87 dcomplex Dot( Int n,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy );
89 T Dot( Int n,
const T* x, Int incx,
const T* y, Int incy );
92 ( Int n,
const float* x, Int incx,
const float* y, Int incy );
94 ( Int n,
const double* x, Int incx,
const double* y, Int incy );
96 ( Int n,
const scomplex* x, Int incx,
const scomplex* y, Int incy );
98 ( Int n,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy );
100 T Dotc( Int n,
const T* x, Int incx,
const T* y, Int incy );
103 ( Int n,
const float* x, Int incx,
const float* y, Int incy );
105 ( Int n,
const double* x, Int incx,
const double* y, Int incy );
107 ( Int n,
const scomplex* x, Int incx,
const scomplex* y, Int incy );
109 ( Int n,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy );
111 T Dotu( Int n,
const T* x, Int incx,
const T* y, Int incy );
113 float Nrm2( Int n,
const float* x, Int incx );
114 double Nrm2( Int n,
const double* x, Int incx );
115 float Nrm2( Int n,
const scomplex* x, Int incx );
116 double Nrm2( Int n,
const dcomplex* x, Int incx );
117 template<
typename F> F Nrm2( Int n,
const F* x, Int incx );
119 void Scal( Int n,
float alpha,
float* x, Int incx );
120 void Scal( Int n,
double alpha,
double* x, Int incx );
121 void Scal( Int n, scomplex alpha, scomplex* x, Int incx );
122 void Scal( Int n, dcomplex alpha, dcomplex* x, Int incx );
123 template<
typename F>
void Scal( Int n, F alpha, F* x, Int incx );
129 (
char trans, Int m, Int n,
130 float alpha,
const float* A, Int lda,
const float* x, Int incx,
131 float beta,
float* y, Int incy );
133 (
char trans, Int m, Int n,
134 double alpha,
const double* A, Int lda,
const double* x, Int incx,
135 double beta,
double* y, Int incy );
137 (
char trans, Int m, Int n,
138 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* x, Int incx,
139 scomplex beta, scomplex* y, Int incy );
141 (
char trans, Int m, Int n,
142 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* x, Int incx,
143 dcomplex beta, dcomplex* y, Int incy );
146 (
char trans, Int m, Int n,
147 T alpha,
const T* A, Int lda,
const T* x, Int incx,
148 T beta, T* y, Int incy );
152 float alpha,
const float* x, Int incx,
const float* y, Int incy,
156 double alpha,
const double* x, Int incx,
const double* y, Int incy,
157 double* A, Int lda );
160 scomplex alpha,
const scomplex* x, Int incx,
const scomplex* y, Int incy,
161 scomplex* A, Int lda );
164 dcomplex alpha,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy,
165 dcomplex* A, Int lda );
168 (
char trans, Int m, Int n,
169 T alpha,
const T* x, Int incx,
const T* y, Int incy,
170 T beta, T* A, Int lda );
174 float alpha,
const float* x, Int incx,
const float* y, Int incy,
178 double alpha,
const double* x, Int incx,
const double* y, Int incy,
179 double* A, Int lda );
182 scomplex alpha,
const scomplex* x, Int incx,
const scomplex* y, Int incy,
183 scomplex* A, Int lda );
186 dcomplex alpha,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy,
187 dcomplex* A, Int lda );
190 (
char trans, Int m, Int n,
191 T alpha,
const T* x, Int incx,
const T* y, Int incy,
192 T beta, T* A, Int lda );
196 float alpha,
const float* x, Int incx,
const float* y, Int incy,
200 double alpha,
const double* x, Int incx,
const double* y, Int incy,
201 double* A, Int lda );
204 scomplex alpha,
const scomplex* x, Int incx,
const scomplex* y, Int incy,
205 scomplex* A, Int lda );
208 dcomplex alpha,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy,
209 dcomplex* A, Int lda );
212 (
char trans, Int m, Int n,
213 T alpha,
const T* x, Int incx,
const T* y, Int incy,
214 T beta, T* A, Int lda );
218 float alpha,
const float* A, Int lda,
const float* x, Int incx,
219 float beta,
float* y, Int incy );
222 double alpha,
const double* A, Int lda,
const double* x, Int incx,
223 double beta,
double* y, Int incy );
226 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* x, Int incx,
227 scomplex beta, scomplex* y, Int incy );
230 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* x, Int incx,
231 dcomplex beta, dcomplex* y, Int incy );
235 T alpha,
const T* A, Int lda,
const T* x, Int incx,
236 T beta, T* y, Int incy );
240 float alpha,
const float* x, Int incx,
float* A, Int lda );
243 double alpha,
const double* x, Int incx,
double* A, Int lda );
246 scomplex alpha,
const scomplex* x, Int incx, scomplex* A, Int lda );
249 dcomplex alpha,
const dcomplex* x, Int incx, dcomplex* A, Int lda );
251 void Hemv(
char uplo, Int m, T alpha,
const T* x, Int incx, T* A, Int lda );
255 float alpha,
const float* x, Int incx,
const float* y, Int incy,
259 double alpha,
const double* x, Int incx,
const double* y, Int incy,
260 double* A, Int lda );
263 scomplex alpha,
const scomplex* x, Int incx,
const scomplex* y, Int incy,
264 scomplex* A, Int lda );
267 dcomplex alpha,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy,
268 dcomplex* A, Int lda );
272 T alpha,
const T* x, Int incx,
const T* y, Int incy,
277 float alpha,
const float* A, Int lda,
const float* x, Int incx,
278 float beta,
float* y, Int incy );
281 double alpha,
const double* A, Int lda,
const double* x, Int incx,
282 double beta,
double* y, Int incy );
285 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* x, Int incx,
286 scomplex beta, scomplex* y, Int incy );
289 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* x, Int incx,
290 dcomplex beta, dcomplex* y, Int incy );
294 T alpha,
const T* A, Int lda,
const T* x, Int incx,
295 T beta, T* y, Int incy );
299 float alpha,
const float* x, Int incx,
float* A, Int lda );
302 double alpha,
const double* x, Int incx,
double* A, Int lda );
305 scomplex alpha,
const scomplex* x, Int incx, scomplex* A, Int lda );
308 dcomplex alpha,
const dcomplex* x, Int incx, dcomplex* A, Int lda );
310 void Syr(
char uplo, Int m, T alpha,
const T* x, Int incx, T* A, Int lda );
314 float alpha,
const float* x, Int incx,
const float* y, Int incy,
318 double alpha,
const double* x, Int incx,
const double* y, Int incy,
319 double* A, Int lda );
322 scomplex alpha,
const scomplex* x, Int incx,
const scomplex* y, Int incy,
323 scomplex* A, Int lda );
326 dcomplex alpha,
const dcomplex* x, Int incx,
const dcomplex* y, Int incy,
327 dcomplex* A, Int lda );
331 T alpha,
const T* x, Int incx,
const T* y, Int incy,
335 (
char uplo,
char trans,
char diag, Int m,
336 const float* A, Int lda,
float* x, Int incx );
338 (
char uplo,
char trans,
char diag, Int m,
339 const double* A, Int lda,
double* x, Int incx );
341 (
char uplo,
char trans,
char diag, Int m,
342 const scomplex* A, Int lda, scomplex* x, Int incx );
344 (
char uplo,
char trans,
char diag, Int m,
345 const dcomplex* A, Int lda, dcomplex* x, Int incx );
348 (
char uplo,
char trans,
char diag, Int m,
349 const T* A, Int lda, T* x, Int incx );
352 (
char uplo,
char trans,
char diag, Int m,
353 const float* A, Int lda,
float* x, Int incx );
355 (
char uplo,
char trans,
char diag, Int m,
356 const double* A, Int lda,
double* x, Int incx );
358 (
char uplo,
char trans,
char diag, Int m,
359 const scomplex* A, Int lda, scomplex* x, Int incx );
361 (
char uplo,
char trans,
char diag, Int m,
362 const dcomplex* A, Int lda, dcomplex* x, Int incx );
365 (
char uplo,
char trans,
char diag, Int m,
366 const T* A, Int lda, T* x, Int incx );
372 (
char transA,
char transB, Int m, Int n, Int k,
373 float alpha,
const float* A, Int lda,
const float* B, Int ldb,
374 float beta,
float* C, Int ldc );
376 (
char transA,
char transB, Int m, Int n, Int k,
377 double alpha,
const double* A, Int lda,
const double* B, Int ldb,
378 double beta,
double* C, Int ldc );
380 (
char transA,
char transB, Int m, Int n, Int k,
381 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* B, Int ldb,
382 scomplex beta, scomplex* C, Int ldc );
384 (
char transA,
char transB, Int m, Int n, Int k,
385 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* B, Int ldb,
386 dcomplex beta, dcomplex* C, Int ldc );
389 (
char transA,
char transB, Int m, Int n, Int k,
390 T alpha,
const T* A, Int lda,
const T* B, Int ldb,
391 T beta, T* C, Int ldc );
394 (
char side,
char uplo, Int m, Int n,
395 float alpha,
const float* A, Int lda,
const float* B, Int ldb,
396 float beta,
float* C, Int ldc );
398 (
char side,
char uplo, Int m, Int n,
399 double alpha,
const double* A, Int lda,
const double* B, Int ldb,
400 double beta,
double* C, Int ldc );
402 (
char side,
char uplo, Int m, Int n,
403 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* B, Int ldb,
404 scomplex beta, scomplex* C, Int ldc );
406 (
char side,
char uplo, Int m, Int n,
407 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* B, Int ldb,
408 dcomplex beta, dcomplex* C, Int ldc );
411 (
char side,
char uplo, Int m, Int n,
412 T alpha,
const T* A, Int lda,
const T* B, Int ldb,
413 T beta, T* C, Int ldc );
416 (
char uplo,
char trans, Int n, Int k,
417 float alpha,
const float* A, Int lda,
const float* B, Int ldb,
418 float beta,
float* C, Int ldc );
420 (
char uplo,
char trans, Int n, Int k,
421 double alpha,
const double* A, Int lda,
const double* B, Int ldb,
422 double beta,
double* C, Int ldc );
424 (
char uplo,
char trans, Int n, Int k,
425 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* B, Int ldb,
426 scomplex beta, scomplex* C, Int ldc );
428 (
char uplo,
char trans, Int n, Int k,
429 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* B, Int ldb,
430 dcomplex beta, dcomplex* C, Int ldc );
433 (
char uplo,
char trans, Int n, Int k,
434 T alpha,
const T* A, Int lda,
const T* B, Int ldb,
435 T beta, T* C, Int ldc );
438 (
char uplo,
char trans, Int n, Int k,
439 float alpha,
const float* A, Int lda,
float beta,
float* C, Int ldc );
441 (
char uplo,
char trans, Int n, Int k,
442 double alpha,
const double* A, Int lda,
double beta,
double* C, Int ldc );
444 (
char uplo,
char trans, Int n, Int k,
445 scomplex alpha,
const scomplex* A, Int lda,
446 scomplex beta, scomplex* C, Int ldc );
448 (
char uplo,
char trans, Int n, Int k,
449 dcomplex alpha,
const dcomplex* A, Int lda,
450 dcomplex beta, dcomplex* C, Int ldc );
453 (
char uplo,
char trans, Int n, Int k,
454 T alpha,
const T* A, Int lda,
455 T beta, T* C, Int ldc );
458 (
char side,
char uplo, Int m, Int n,
459 float alpha,
const float* A, Int lda,
const float* B, Int ldb,
460 float beta,
float* C, Int ldc );
462 (
char side,
char uplo, Int m, Int n,
463 double alpha,
const double* A, Int lda,
const double* B, Int ldb,
464 double beta,
double* C, Int ldc );
466 (
char side,
char uplo, Int m, Int n,
467 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* B, Int ldb,
468 scomplex beta, scomplex* C, Int ldc );
470 (
char side,
char uplo, Int m, Int n,
471 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* B, Int ldb,
472 dcomplex beta, dcomplex* C, Int ldc );
475 (
char side,
char uplo, Int m, Int n,
476 T alpha,
const T* A, Int lda,
const T* B, Int ldb,
477 T beta, T* C, Int ldc );
480 (
char uplo,
char trans, Int n, Int k,
481 float alpha,
const float* A, Int lda,
const float* B, Int ldb,
482 float beta,
float* C, Int ldc );
484 (
char uplo,
char trans, Int n, Int k,
485 double alpha,
const double* A, Int lda,
const double* B, Int ldb,
486 double beta,
double* C, Int ldc );
488 (
char uplo,
char trans, Int n, Int k,
489 scomplex alpha,
const scomplex* A, Int lda,
const scomplex* B, Int ldb,
490 scomplex beta, scomplex* C, Int ldc );
492 (
char uplo,
char trans, Int n, Int k,
493 dcomplex alpha,
const dcomplex* A, Int lda,
const dcomplex* B, Int ldb,
494 dcomplex beta, dcomplex* C, Int ldc );
497 (
char uplo,
char trans, Int n, Int k,
498 T alpha,
const T* A, Int lda,
const T* B, Int ldb,
499 T beta, T* C, Int ldc );
502 (
char uplo,
char trans, Int n, Int k,
503 float alpha,
const float* A, Int lda,
504 float beta,
float* C, Int ldc );
506 (
char uplo,
char trans, Int n, Int k,
507 double alpha,
const double* A, Int lda,
508 double beta,
double* C, Int ldc );
510 (
char uplo,
char trans, Int n, Int k,
511 scomplex alpha,
const scomplex* A, Int lda,
512 scomplex beta, scomplex* C, Int ldc );
514 (
char uplo,
char trans, Int n, Int k,
515 dcomplex alpha,
const dcomplex* A, Int lda,
516 dcomplex beta, dcomplex* C, Int ldc );
519 (
char uplo,
char trans, Int n, Int k,
520 T alpha,
const T* A, Int lda,
521 T beta, T* C, Int ldc );
524 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
525 float alpha,
const float* A, Int lda,
float* B, Int ldb );
527 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
528 double alpha,
const double* A, Int lda,
double* B, Int ldb );
530 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
531 scomplex alpha,
const scomplex* A, Int lda, scomplex* B, Int ldb );
533 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
534 dcomplex alpha,
const dcomplex* A, Int lda, dcomplex* B, Int ldb );
537 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
538 T alpha,
const T* A, Int lda, T* B, Int ldb );
541 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
542 float alpha,
const float* A, Int lda,
float* B, Int ldb );
544 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
545 double alpha,
const double* A, Int lda,
double* B, Int ldb );
547 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
548 scomplex alpha,
const scomplex* A, Int lda, scomplex* B, Int ldb );
550 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
551 dcomplex alpha,
const dcomplex* A, Int lda, dcomplex* B, Int ldb );
554 (
char side,
char uplo,
char trans,
char unit, Int m, Int n,
555 T alpha,
const T* A, Int lda, T* B, Int ldb );
560 #endif //_PEXSI_BLAS_HPP_