Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
Blas.h
Go to the documentation of this file.
1 #ifndef BLAS_H
2 #define BLAS_H
7 #include <complex>
8 
9 extern "C" {
10 
11 /* Level 1 BLAS */
12 double dscal_(const int& n, const double&, double* x, const int&);
13 double zscal_(const int& n, const std::complex<double>&,
14  std::complex<double>* x, const int&);
15 
16 void zcopy_(const int& n, const std::complex<double>* x, const int& incx,
17  std::complex<double>* y, const int& incy);
18 void dcopy_(const int& n, const double*, const int&, double*, const int&);
19 
20 /* Level 2 BLAS */
21 
22 void dgemv_(const char& trans, const int& nr, const int& nc,
23  const double& alpha, const double* amat, const int& lda,
24  const double* bv, const int& incx, const double& beta, double* cv,
25  const int& incy);
26 
27 void zgemv_(const char& trans, const int& nr, const int& nc,
28  const std::complex<double>& alpha, const std::complex<double>* amat,
29  const int& lda, const std::complex<double>* bv, const int& incx,
30  const std::complex<double>& beta, std::complex<double>* cv,
31  const int& incy);
32 
33 void daxpy_(const int& n, const double& da, const double* dx, const int& incx,
34  double* dy, const int& incy);
35 
36 /* Level 3 BLAS */
37 void dgemm_(const char&, const char&, const int&, const int&, const int&,
38  const double&, const double*, const int&, const double*, const int&,
39  const double&, double*, const int&);
40 void zgemm_(const char&, const char&, const int&, const int&, const int&,
41  const std::complex<double>&, const std::complex<double>*,
42  const int&, const std::complex<double>*, const int&,
43  const std::complex<double>&, std::complex<double>*, const int&);
44 
45 // Lapack forward declarations
46 void dgeev_(char* JOBVL, char* JOBVR, int* N, double* A, int* LDA, double* WR,
47  double* WI, double* VL, int* LDVL, double* VR, int* LDVR,
48  double* WORK, int* LWORK, int* INFO);
49 void zgeev_(char* JOBVL, char* JOBVR, int* N, std::complex<double>* A, int* LDA,
50  std::complex<double>* W, std::complex<double>* VL, int* LDVL,
51  std::complex<double>* VR, int* LDVR, std::complex<double>* WORK,
52  int* LWORK, double* RWORK, int* INFO);
53 void dgetrf_(int* M, int* N, double* A, int* LDA, int* IPIV, int* INFO);
54 void zgetrf_(int* M, int* N, std::complex<double>* A, int* LDA, int* IPIV,
55  int* INFO);
56 double dlange_(char* NORM, int* M, int* N, double* A, int* LDA, double* work);
57 double zlange_(char* NORM, int* M, int* N, std::complex<double>* A, int* LDA,
58  double* work);
59 
60 void dsyev_(char* JOBZ, char* UPLO, int* N, double* A, int* LDA, double* W,
61  double* WORK, int* LWORK, int* INFO);
62 void zheev_(char* JOBZ, char* UPLO, int* N, std::complex<double>* A, int* LDA,
63  double* W, std::complex<double>* WORK, int* LWORK, double* RWORK,
64  int* INFO);
65 }
66 
67 #endif /* BLAS_H */