27 #ifndef math_templateLapack_hpp
28 #define math_templateLapack_hpp
36 #if defined(MXLIB_MKL)
38 #define MKL_Complex8 float _Complex
39 #define MKL_Complex16 double _Complex
49 typedef MKL_INT MXLAPACK_INT;
50 #define MKL_CONST_PTR const
53 typedef int MXLAPACK_INT;
61 #ifndef MXNODEF_LAPACK_INT
63 #define lapack_int MXLAPACK_INT
109 template<
typename dataT>
124 float lamch<float>(
char CMACH);
128 double lamch<double>(
char CMACH);
137 template<
typename dataT>
146 MXLAPACK_INT potrf<float> (
char UPLO, MXLAPACK_INT N,
float * A, MXLAPACK_INT LDA, MXLAPACK_INT &INFO );
149 MXLAPACK_INT potrf<double> (
char UPLO, MXLAPACK_INT N,
double * A, MXLAPACK_INT LDA, MXLAPACK_INT &INFO );
152 MXLAPACK_INT potrf<std::complex<float>> (
char UPLO, MXLAPACK_INT N, std::complex<float> * A, MXLAPACK_INT LDA, MXLAPACK_INT &INFO );
155 MXLAPACK_INT potrf<std::complex<double>> (
char UPLO, MXLAPACK_INT N, std::complex<double> * A, MXLAPACK_INT LDA, MXLAPACK_INT &INFO );
182 template<
typename dataT>
207 MXLAPACK_INT sytrd<float>(
char UPLO, MXLAPACK_INT N,
float * A, MXLAPACK_INT LDA,
float *D,
float *E,
float *TAU,
float *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT INFO);
210 MXLAPACK_INT sytrd<double>(
char UPLO, MXLAPACK_INT N,
double * A, MXLAPACK_INT LDA,
double *D,
double *E,
double *TAU,
double *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT INFO);
222 template<
typename dataT>
223 MXLAPACK_INT
syevr (
char JOBZ,
char RANGE,
char UPLO, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, dataT VL, dataT VU, MXLAPACK_INT IL,
224 MXLAPACK_INT IU, dataT ABSTOL, MXLAPACK_INT *M, dataT *W, dataT *Z, MXLAPACK_INT LDZ, MXLAPACK_INT *ISUPPZ, dataT *WORK, MXLAPACK_INT
225 LWORK, MXLAPACK_INT *IWORK, MXLAPACK_INT LIWORK )
252 MXLAPACK_INT syevr<float> (
char JOBZ,
char RANGE,
char UPLO, MXLAPACK_INT N,
float *A, MXLAPACK_INT LDA,
float VL,
float VU,
253 MXLAPACK_INT IL, MXLAPACK_INT IU,
float ABSTOL, MXLAPACK_INT *M,
float *W,
float *Z, MXLAPACK_INT LDZ, MXLAPACK_INT *ISUPPZ,
254 float *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT *IWORK, MXLAPACK_INT LIWORK );
258 MXLAPACK_INT syevr<double> (
char JOBZ,
char RANGE,
char UPLO, MXLAPACK_INT N,
double *A, MXLAPACK_INT LDA,
double VL,
double VU,
259 MXLAPACK_INT IL, MXLAPACK_INT IU,
double ABSTOL, MXLAPACK_INT *M,
double *W,
double *Z, MXLAPACK_INT LDZ, MXLAPACK_INT *ISUPPZ,
260 double *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT *IWORK, MXLAPACK_INT LIWORK );
411 template<
typename dataT>
412 MXLAPACK_INT
gesvd(
char JOBU,
char JOBVT, MXLAPACK_INT M, MXLAPACK_INT N, dataT * A, MXLAPACK_INT LDA, dataT * S, dataT *U, MXLAPACK_INT LDU,
413 dataT * VT, MXLAPACK_INT LDVT, dataT * WORK, MXLAPACK_INT LWORK)
433 MXLAPACK_INT gesvd<float>(
char JOBU,
char JOBVT, MXLAPACK_INT M, MXLAPACK_INT N,
float * A, MXLAPACK_INT LDA,
float * S,
float *U, MXLAPACK_INT LDU,
434 float * VT, MXLAPACK_INT LDVT,
float * WORK, MXLAPACK_INT LWORK);
438 MXLAPACK_INT gesvd<double>(
char JOBU,
char JOBVT, MXLAPACK_INT M, MXLAPACK_INT N,
double * A, MXLAPACK_INT LDA,
double * S,
double *U, MXLAPACK_INT LDU,
439 double * VT, MXLAPACK_INT LDVT,
double * WORK, MXLAPACK_INT LWORK);
586 template<
typename dataT>
587 MXLAPACK_INT gesdd(
char JOBZ, MXLAPACK_INT M, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, dataT *S, dataT * U, MXLAPACK_INT LDU, dataT * VT, MXLAPACK_INT LDVT, dataT *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT * IWORK, MXLAPACK_INT INFO)
604 MXLAPACK_INT gesdd<float>(
char JOBZ, MXLAPACK_INT M, MXLAPACK_INT N,
float *A, MXLAPACK_INT LDA,
float *S,
float * U, MXLAPACK_INT LDU,
float * VT, MXLAPACK_INT LDVT,
float *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT * IWORK, MXLAPACK_INT INFO);
608 MXLAPACK_INT gesdd<double>(
char JOBZ, MXLAPACK_INT M, MXLAPACK_INT N,
double *A, MXLAPACK_INT LDA,
double *S,
double * U, MXLAPACK_INT LDU,
double * VT, MXLAPACK_INT LDVT,
double *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT * IWORK, MXLAPACK_INT INFO);
MXLAPACK_INT sytrd(char UPLO, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, dataT *D, dataT *E, dataT *TAU, dataT *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT INFO)
Reduce a real symmetric matrix to real symmetric tridiagonal form by an orthogonal similarity transfo...
MXLAPACK_INT syevr(char JOBZ, char RANGE, char UPLO, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, dataT VL, dataT VU, MXLAPACK_INT IL, MXLAPACK_INT IU, dataT ABSTOL, MXLAPACK_INT *M, dataT *W, dataT *Z, MXLAPACK_INT LDZ, MXLAPACK_INT *ISUPPZ, dataT *WORK, MXLAPACK_INT LWORK, MXLAPACK_INT *IWORK, MXLAPACK_INT LIWORK)
Compute selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix.
dataT lamch(char CMACH)
Determine machine parameters.
MXLAPACK_INT gesvd(char JOBU, char JOBVT, MXLAPACK_INT M, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, dataT *S, dataT *U, MXLAPACK_INT LDU, dataT *VT, MXLAPACK_INT LDVT, dataT *WORK, MXLAPACK_INT LWORK)
Compute the singular value decomposition (SVD) of a real matrix.
MXLAPACK_INT potrf(char UPLO, MXLAPACK_INT N, dataT *A, MXLAPACK_INT LDA, MXLAPACK_INT &INFO)
Compute the Cholesky factorization of a real symmetric positive definite matrix A.