Chombo + EB  3.2
Lapack.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _LAPACK_H_
12 #define _LAPACK_H_
13 #include "FortranNameMacro.H"
14 #include "BaseNamespaceHeader.H"
15 
16 /// Forward declaration of lapack routines
17 extern "C"
18 {
19 #ifdef CH_USE_LAPACK
20  /// Double General Solve
21  void LAPACK(GESV,gesv)(int*, int*, Real*, int*, int*, Real*, int*, int*);
22 
23  /// Double Least Squares
24  void LAPACK(GELS,gels)(char* TRANS, int* M, int* N, int* NRHS, Real* A,
25  int* LDA, Real* B, int* LDB,
26  Real* WORK, int* LWORK, int* INFO);
27 
28  /// Double Least Squares transpose via SVD
29  void LAPACK(GELSD,gelsd)(int* N, int* M, int* NRHS, Real* At,
30  int* LDA, Real* B, int* LDB, Real* S,
31  Real* RCOND, int* RANK,
32  Real* WORK, int* LWORK, int* IWORK, int* INFO);
33 
34  /// Matrix multiply
35  void LAPACK(GEMV,gemv)(char* TRANS, int* M, int* N, Real* ALPHA,
36  Real* A, int* LDA, Real* X, int* INCX,
37  Real* BETA, Real* Y, int* INCY);
38 
39  /// Double Equality-Constrained Least Squares
40  void LAPACK(GGLSE,gglse)(int* M, int* N, int* P, Real* A, int* LDA, Real* B, int* LDB,
41  Real* C, Real* D, Real* X,
42  Real* WORK, int* LWORK, int* INFO);
43 
44  /// QR factorization with Pivoting
45  void LAPACK(GEQP3,geqp3)(int* M, int* N, Real* A, int* LDA, int* JPVT,
46  Real* TAU, Real* WORK, int* LWORK, int* INFO);
47 
48  /// QR factorization
49  void LAPACK(GEQRF,geqrf)(int* M, int* N, Real* A, int* LDA,
50  Real* TAU, Real* WORK, int* LWORK, int* INFO);
51 
52  /// Multiply by Q from QR factorization
53  void LAPACK(ORMQR,ormqr)(char* SIDE, char* TRANS, int* M, int* N, int* K,
54  Real* A, int* LDA, Real* TAU, Real* C, int* LDC,
55  Real* WORK, int* LWORK, int* INFO);
56 
57  /// Generate Q from QR factorization
58  void LAPACK(ORGQR,orgqr)(int* M, int* N, int* K, Real* A, int* LDA,
59  Real* TAU, Real* WORK, int* LWORK, int* INFO);
60 
61  /// Triangular solve
62  void LAPACK(TRTRS,trtrs)(char* UPLO, char* TRANS, char* DIAG, int* N, int* NRHS,
63  Real* A, int* LDA, Real* B, int* LDB, int* INFO);
64 
65  /// LU decomoposition of a general matrix
66  void LAPACK(GETRF,getrf)(int* M, int *N, Real* A, int* lda, int* IPIV, int* INFO);
67 
68  /// generate inverse of a matrix given its LU decomposition
69  void LAPACK(GETRI,getri)(int* N, Real* A, int* lda, int* IPIV, Real* WORK, int* lwork, int* INFO);
70 
71  /// get condition number of the matrix
72  void LAPACK(GECON,gecon)(char* TRANS, int* N, Real* A, int* LDA, Real* ANORM, Real* rcond,
73  Real* WORK, int* LWORK, int* INFO);
74 
75  /// get condition number of triangular matrix
76  void LAPACK(TRCON,trcon)(const char* TRANS, const char* UPLO, const char* DIAG,
77  const int* N, const Real* A, const int* LDA,
78  Real* rcond, Real* WORK, int* IWORK, int* INFO);
79 
80 #endif
81 
82  /// multiply two matrices (BLAS routine)
83  void LAPACK(GEMM,gemm)(const char* TRANSA, const char* TRANSB,
84  const int* M, const int* N, const int* K, const Real* ALPHA,
85  const Real* A, const int* LDA,
86  const Real* B, const int* LDB,
87  const Real* BETA, Real* C, const int* LDC);
88 
89  /// solve matrix equations with triangular matrix (BLAS routine)
90  void LAPACK(TRSM,trsm)(const char* SIDE, const char* UPLO,
91  const char* TRANSA, const char* DIAG,
92  const int* M, const int* N, const Real* ALPHA,
93  const Real* A, const int* LDA,
94  Real* B, const int* LDB);
95 }
96 
97 #include "BaseNamespaceFooter.H"
98 #endif
void const char const int const int const int const Real const Real const int const Real const int const Real Real const int * LDC
Definition: Lapack.H:83
void const char * UPLO
Definition: Lapack.H:90
void const char const int const int const int const Real const Real const int const Real const int * LDB
Definition: Lapack.H:83
void const char * TRANSB
Definition: Lapack.H:83
void const char const int const int const int const Real const Real const int const Real const int const Real Real * C
Definition: Lapack.H:83
void const char const int const int const int const Real * ALPHA
Definition: Lapack.H:83
void LAPACK(GEMM, gemm)(const char *TRANSA
Forward declaration of lapack routines.
void const char const int const int const int const Real const Real * A
Definition: Lapack.H:83
void const char const char const char * DIAG
Definition: Lapack.H:90
double Real
Definition: REAL.H:33
void const char const int const int const int * K
Definition: Lapack.H:83
void const char const int * M
Definition: Lapack.H:83
void const char const char * TRANSA
Definition: Lapack.H:90
void const char const int const int * N
Definition: Lapack.H:83
void const char const int const int const int const Real const Real const int const Real * B
Definition: Lapack.H:83
void const char const int const int const int const Real const Real const int const Real const int const Real * BETA
Definition: Lapack.H:83
void const char const int const int const int const Real const Real const int * LDA
Definition: Lapack.H:83