-
Notifications
You must be signed in to change notification settings - Fork 0
/
lapack.h
37 lines (25 loc) · 1.05 KB
/
lapack.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef LAPACK_H
#define LAPACK_H
extern void dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
extern void dgetri_(int *n, double *a, int *lda, int *ipiv, double *work,
int *lwork, int *info);
extern void dgtsv_(const int *n, const int *nrhs, const double *dl, double *d,
double *du, double *b, int *ldb, int *info);
extern 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 dgetri(int n, double *a, int lda, int *ipiv, double *work, int lwork,
int *info) {
dgetri_(&n, a, &lda, ipiv, work, &lwork, info);
}
void dgetrf(int m, int n, double *a, int lda, int *ipiv, int *info) {
dgetrf_(&m, &n, a, &lda, ipiv, info);
}
void dgtsv(int n, int nrhs, double *dl, double *d, double *du, double *b,
int ldb, int *info) {
dgtsv_(&n, &nrhs, dl, d, du, b, &ldb, info);
}
void dsyev(char jobz, char uplo, int n, double *a, int lda, double *w,
double *work, int lwork, int *info) {
dsyev_(&jobz, &uplo, &n, a, &lda, w, work, &lwork, info);
}
#endif