ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
lapack_connector.h File Reference

This is a wrapper of some LAPACK routines. Row-Major version. More...

#include <new>
#include <stdexcept>
#include <iostream>
#include <cassert>
#include "../matrix.h"
#include "../complexmatrix.h"
#include "../global_function.h"
#include <limits>
Include dependency graph for lapack_connector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  LapackConnector

Functions

void dsygvd_ (const int *itype, const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, double *w, double *work, const int *lwork, int *iwork, const int *liwork, int *info)
void chegvd_ (const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, float *w, std::complex< float > *work, const int *lwork, float *rwork, const int *lrwork, int *iwork, const int *liwork, int *info)
void zhegvd_ (const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, double *w, std::complex< double > *work, const int *lwork, double *rwork, const int *lrwork, int *iwork, const int *liwork, int *info)
void dsyevx_ (const char *jobz, const char *range, const char *uplo, const int *n, double *a, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info)
void cheevx_ (const char *jobz, const char *range, const char *uplo, const int *n, std::complex< float > *a, const int *lda, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, std::complex< float > *z, const int *ldz, std::complex< float > *work, const int *lwork, float *rwork, int *iwork, int *ifail, int *info)
void zheevx_ (const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *a, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, std::complex< double > *z, const int *ldz, std::complex< double > *work, const int *lwork, double *rwork, int *iwork, int *ifail, int *info)
void dsygvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info)
void chegvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, std::complex< float > *z, const int *ldz, std::complex< float > *work, const int *lwork, float *rwork, int *iwork, int *ifail, int *info)
void zhegvx_ (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, std::complex< double > *z, const int *ldz, std::complex< double > *work, const int *lwork, double *rwork, int *iwork, int *ifail, int *info)
void dsygv_ (const int *itype, const char *jobz, const char *uplo, const int *n, double *a, const int *lda, double *b, const int *ldb, double *w, double *work, const int *lwork, int *info)
void chegv_ (const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, std::complex< float > *b, const int *ldb, float *w, std::complex< float > *work, const int *lwork, float *rwork, int *info)
void zhegv_ (const int *itype, const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *b, const int *ldb, double *w, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void ssyev_ (const char *jobz, const char *uplo, const int *n, float *a, const int *lda, float *w, float *work, const int *lwork, int *info)
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 cheev_ (const char *jobz, const char *uplo, const int *n, std::complex< float > *a, const int *lda, float *w, std::complex< float > *work, const int *lwork, float *rwork, int *info)
void zheev_ (const char *jobz, const char *uplo, const int *n, std::complex< double > *a, const int *lda, double *w, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void dgeev_ (const char *jobvl, const char *jobvr, const int *n, double *a, const int *lda, double *wr, double *wi, double *vl, const int *ldvl, double *vr, const int *ldvr, double *work, const int *lwork, int *info)
void zgeev_ (const char *jobvl, const char *jobvr, const int *n, std::complex< double > *a, const int *lda, std::complex< double > *w, std::complex< double > *vl, const int *ldvl, std::complex< double > *vr, const int *ldvr, std::complex< double > *work, const int *lwork, double *rwork, int *info)
void dgetrf_ (const int *m, const int *n, double *a, const int *lda, int *ipiv, int *info)
void dgetri_ (const int *n, double *a, const int *lda, const int *ipiv, double *work, const int *lwork, int *info)
void dsytrf_ (const char *uplo, const int *n, double *a, const int *lda, int *ipiv, double *work, const int *lwork, int *info)
void dsytri_ (const char *uplo, const int *n, double *a, const int *lda, const int *ipiv, double *work, int *info)
void spotrf_ (const char *uplo, const int *n, float *a, const int *lda, int *info)
void dpotrf_ (const char *uplo, const int *n, double *a, const int *lda, int *info)
void cpotrf_ (const char *uplo, const int *n, std::complex< float > *a, const int *lda, int *info)
void zpotrf_ (const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
void spotri_ (const char *uplo, const int *n, float *a, const int *lda, int *info)
void dpotri_ (const char *uplo, const int *n, double *a, const int *lda, int *info)
void cpotri_ (const char *uplo, const int *n, std::complex< float > *a, const int *lda, int *info)
void zpotri_ (const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
void zgetrf_ (const int *m, const int *n, std::complex< double > *a, const int *lda, int *ipiv, int *info)
void zgetri_ (const int *n, std::complex< double > *a, const int *lda, const int *ipiv, std::complex< double > *work, const int *lwork, int *info)
void dsterf_ (const int *n, double *d, double *e, int *info)
void dstein_ (const int *n, const double *d, const double *e, const int *m, const double *w, const int *iblock, const int *isplit, double *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
void zstein_ (const int *n, const double *d, const double *e, const int *m, const double *w, const int *iblock, const int *isplit, std::complex< double > *z, const int *ldz, double *work, int *iwork, int *ifail, int *info)
void dpotf2_ (const char *uplo, const int *n, double *a, const int *lda, int *info)
void zpotf2_ (const char *uplo, const int *n, std::complex< double > *a, const int *lda, int *info)
void dgtsv_ (const int *n, const int *nrhs, double *dl, double *d, double *du, double *b, const int *ldb, int *info)
void dsysv_ (const char *uplo, const int *n, const int *nrhs, double *a, const int *lda, int *ipiv, double *b, const int *ldb, double *work, const int *lwork, int *info)
double dlange_ (const char *norm, const int *m, const int *n, const double *A, const int *lda, double *work)
double zlange_ (const char *norm, const int *m, const int *n, const std::complex< double > *A, const int *lda, double *work)

Variables

constexpr double LAPACK_ABSTOL = 0.0
constexpr double LAPACK_ORFAC = -1.0

Detailed Description

This is a wrapper of some LAPACK routines. Row-Major version.

Warning
MAY BE DEPRECATED IN THE FUTURE.
For Column-major version, please refer to source/source_base/module_container/base/third_party/lapack.h.
Note
!!! Note that This wrapper is a C++ style wrapper of LAPACK routines, i.e., assuming that the input matrices are in row-major order. The data layout in C++ is row-major, C style, while the original LAPACK is column-major, fortran style. (ModuleBase::ComplexMatrix is in row-major order) The wrapper will do the data transformation between row-major and column-major order automatically.

Function Documentation

◆ cheev_()

void cheev_ ( const char * jobz,
const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
float * w,
std::complex< float > * work,
const int * lwork,
float * rwork,
int * info )

◆ cheevx_()

void cheevx_ ( const char * jobz,
const char * range,
const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
const float * vl,
const float * vu,
const int * il,
const int * iu,
const float * abstol,
int * m,
float * w,
std::complex< float > * z,
const int * ldz,
std::complex< float > * work,
const int * lwork,
float * rwork,
int * iwork,
int * ifail,
int * info )

◆ chegv_()

void chegv_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
std::complex< float > * b,
const int * ldb,
float * w,
std::complex< float > * work,
const int * lwork,
float * rwork,
int * info )

◆ chegvd_()

void chegvd_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
std::complex< float > * b,
const int * ldb,
float * w,
std::complex< float > * work,
const int * lwork,
float * rwork,
const int * lrwork,
int * iwork,
const int * liwork,
int * info )

◆ chegvx_()

void chegvx_ ( const int * itype,
const char * jobz,
const char * range,
const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
std::complex< float > * b,
const int * ldb,
const float * vl,
const float * vu,
const int * il,
const int * iu,
const float * abstol,
int * m,
float * w,
std::complex< float > * z,
const int * ldz,
std::complex< float > * work,
const int * lwork,
float * rwork,
int * iwork,
int * ifail,
int * info )

◆ cpotrf_()

void cpotrf_ ( const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
int * info )

◆ cpotri_()

void cpotri_ ( const char * uplo,
const int * n,
std::complex< float > * a,
const int * lda,
int * info )

◆ dgeev_()

void dgeev_ ( const char * jobvl,
const char * jobvr,
const int * n,
double * a,
const int * lda,
double * wr,
double * wi,
double * vl,
const int * ldvl,
double * vr,
const int * ldvr,
double * work,
const int * lwork,
int * info )

◆ dgetrf_()

void dgetrf_ ( const int * m,
const int * n,
double * a,
const int * lda,
int * ipiv,
int * info )

◆ dgetri_()

void dgetri_ ( const int * n,
double * a,
const int * lda,
const int * ipiv,
double * work,
const int * lwork,
int * info )

◆ dgtsv_()

void dgtsv_ ( const int * n,
const int * nrhs,
double * dl,
double * d,
double * du,
double * b,
const int * ldb,
int * info )

◆ dlange_()

double dlange_ ( const char * norm,
const int * m,
const int * n,
const double * A,
const int * lda,
double * work )
Here is the call graph for this function:

◆ dpotf2_()

void dpotf2_ ( const char * uplo,
const int * n,
double * a,
const int * lda,
int * info )

◆ dpotrf_()

void dpotrf_ ( const char * uplo,
const int * n,
double * a,
const int * lda,
int * info )

◆ dpotri_()

void dpotri_ ( const char * uplo,
const int * n,
double * a,
const int * lda,
int * info )

◆ dstein_()

void dstein_ ( const int * n,
const double * d,
const double * e,
const int * m,
const double * w,
const int * iblock,
const int * isplit,
double * z,
const int * ldz,
double * work,
int * iwork,
int * ifail,
int * info )

◆ dsterf_()

void dsterf_ ( const int * n,
double * d,
double * e,
int * info )

◆ dsyev_()

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 )

◆ dsyevx_()

void dsyevx_ ( const char * jobz,
const char * range,
const char * uplo,
const int * n,
double * a,
const int * lda,
const double * vl,
const double * vu,
const int * il,
const int * iu,
const double * abstol,
int * m,
double * w,
double * z,
const int * ldz,
double * work,
const int * lwork,
int * iwork,
int * ifail,
int * info )

◆ dsygv_()

void dsygv_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
double * a,
const int * lda,
double * b,
const int * ldb,
double * w,
double * work,
const int * lwork,
int * info )

◆ dsygvd_()

void dsygvd_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
double * a,
const int * lda,
double * b,
const int * ldb,
double * w,
double * work,
const int * lwork,
int * iwork,
const int * liwork,
int * info )

◆ dsygvx_()

void dsygvx_ ( const int * itype,
const char * jobz,
const char * range,
const char * uplo,
const int * n,
double * a,
const int * lda,
double * b,
const int * ldb,
const double * vl,
const double * vu,
const int * il,
const int * iu,
const double * abstol,
int * m,
double * w,
double * z,
const int * ldz,
double * work,
const int * lwork,
int * iwork,
int * ifail,
int * info )

◆ dsysv_()

void dsysv_ ( const char * uplo,
const int * n,
const int * nrhs,
double * a,
const int * lda,
int * ipiv,
double * b,
const int * ldb,
double * work,
const int * lwork,
int * info )

◆ dsytrf_()

void dsytrf_ ( const char * uplo,
const int * n,
double * a,
const int * lda,
int * ipiv,
double * work,
const int * lwork,
int * info )
Here is the caller graph for this function:

◆ dsytri_()

void dsytri_ ( const char * uplo,
const int * n,
double * a,
const int * lda,
const int * ipiv,
double * work,
int * info )
Here is the caller graph for this function:

◆ spotrf_()

void spotrf_ ( const char * uplo,
const int * n,
float * a,
const int * lda,
int * info )

◆ spotri_()

void spotri_ ( const char * uplo,
const int * n,
float * a,
const int * lda,
int * info )

◆ ssyev_()

void ssyev_ ( const char * jobz,
const char * uplo,
const int * n,
float * a,
const int * lda,
float * w,
float * work,
const int * lwork,
int * info )
Here is the caller graph for this function:

◆ zgeev_()

void zgeev_ ( const char * jobvl,
const char * jobvr,
const int * n,
std::complex< double > * a,
const int * lda,
std::complex< double > * w,
std::complex< double > * vl,
const int * ldvl,
std::complex< double > * vr,
const int * ldvr,
std::complex< double > * work,
const int * lwork,
double * rwork,
int * info )

◆ zgetrf_()

void zgetrf_ ( const int * m,
const int * n,
std::complex< double > * a,
const int * lda,
int * ipiv,
int * info )

◆ zgetri_()

void zgetri_ ( const int * n,
std::complex< double > * a,
const int * lda,
const int * ipiv,
std::complex< double > * work,
const int * lwork,
int * info )

◆ zheev_()

void zheev_ ( const char * jobz,
const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
double * w,
std::complex< double > * work,
const int * lwork,
double * rwork,
int * info )

◆ zheevx_()

void zheevx_ ( const char * jobz,
const char * range,
const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
const double * vl,
const double * vu,
const int * il,
const int * iu,
const double * abstol,
int * m,
double * w,
std::complex< double > * z,
const int * ldz,
std::complex< double > * work,
const int * lwork,
double * rwork,
int * iwork,
int * ifail,
int * info )

◆ zhegv_()

void zhegv_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
std::complex< double > * b,
const int * ldb,
double * w,
std::complex< double > * work,
const int * lwork,
double * rwork,
int * info )

◆ zhegvd_()

void zhegvd_ ( const int * itype,
const char * jobz,
const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
std::complex< double > * b,
const int * ldb,
double * w,
std::complex< double > * work,
const int * lwork,
double * rwork,
const int * lrwork,
int * iwork,
const int * liwork,
int * info )

◆ zhegvx_()

void zhegvx_ ( const int * itype,
const char * jobz,
const char * range,
const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
std::complex< double > * b,
const int * ldb,
const double * vl,
const double * vu,
const int * il,
const int * iu,
const double * abstol,
int * m,
double * w,
std::complex< double > * z,
const int * ldz,
std::complex< double > * work,
const int * lwork,
double * rwork,
int * iwork,
int * ifail,
int * info )

◆ zlange_()

double zlange_ ( const char * norm,
const int * m,
const int * n,
const std::complex< double > * A,
const int * lda,
double * work )
Here is the call graph for this function:

◆ zpotf2_()

void zpotf2_ ( const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
int * info )

◆ zpotrf_()

void zpotrf_ ( const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
int * info )

◆ zpotri_()

void zpotri_ ( const char * uplo,
const int * n,
std::complex< double > * a,
const int * lda,
int * info )

◆ zstein_()

void zstein_ ( const int * n,
const double * d,
const double * e,
const int * m,
const double * w,
const int * iblock,
const int * isplit,
std::complex< double > * z,
const int * ldz,
double * work,
int * iwork,
int * ifail,
int * info )

Variable Documentation

◆ LAPACK_ABSTOL

double LAPACK_ABSTOL = 0.0
constexpr

◆ LAPACK_ORFAC

double LAPACK_ORFAC = -1.0
constexpr