ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
dngvd_op.h
Go to the documentation of this file.
1// TODO: This is a temperary location for these functions.
2// And will be moved to a global module(module base) later.
3#ifndef MODULE_HSOLVER_DNGVD_H
4#define MODULE_HSOLVER_DNGVD_H
5
10
11namespace hsolver
12{
13
14inline double get_real(const std::complex<double> &x) { return x.real(); }
15
16inline float get_real(const std::complex<float> &x) { return x.real(); }
17
18inline double get_real(const double &x) { return x; }
19
20inline float get_real(const float &x) { return x; }
21
22
23template <typename T, typename Device>
25{
26 using Real = typename GetTypeReal<T>::type;
46 void operator()(const Device* d, const int nstart, const int ldh, const T* A, const T* B, Real* W, T* V);
47};
48
49template <typename T, typename Device>
50struct dngv_op
51{
52 using Real = typename GetTypeReal<T>::type;
63 void operator()(const Device* d, const int nstart, const int ldh, const T* A, T* B, Real* W, T* V);
64};
65
66template <typename T, typename Device>
68{
69 using Real = typename GetTypeReal<T>::type;
81 void operator()(const Device* d, const int nstart, const int ldh, T* A, T* B, const int m, Real* W, T* V);
82};
83
84template <typename T, typename Device>
86{
87 using Real = typename GetTypeReal<T>::type;
106 void operator()(const Device* d, const int nstart, const int ldh, const T* A, const int m, Real* W, T* V);
107};
108
109#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
110
111void createGpuSolverHandle();
112void destroyGpuSolverHandle();
113
114#endif
115
116} // namespace hsolver
117
118#endif // !MODULE_HSOLVER_DNGVD_H
#define T
Definition exp.cpp:237
Definition diag_comm_info.h:9
double get_real(const std::complex< double > &x)
Definition dngvd_op.h:14
T type
Definition macros.h:8
Definition dngvd_op.h:86
typename GetTypeReal< T >::type Real
Definition dngvd_op.h:87
void operator()(const Device *d, const int nstart, const int ldh, const T *A, const int m, Real *W, T *V)
DNEVX computes the first m eigenvalues and their corresponding eigenvectors of a complex generalized ...
Definition dngvd_op.h:51
void operator()(const Device *d, const int nstart, const int ldh, const T *A, T *B, Real *W, T *V)
DNGVX computes first m eigenvalues and eigenvectors of a complex generalized Input Parameters.
typename GetTypeReal< T >::type Real
Definition dngvd_op.h:52
Definition dngvd_op.h:25
void operator()(const Device *d, const int nstart, const int ldh, const T *A, const T *B, Real *W, T *V)
DNGVD computes all the eigenvalues and eigenvectors of a complex generalized Hermitian-definite eigen...
typename GetTypeReal< T >::type Real
Definition dngvd_op.h:26
Definition dngvd_op.h:68
void operator()(const Device *d, const int nstart, const int ldh, T *A, T *B, const int m, Real *W, T *V)
DNGVX computes first m eigenvalues and eigenvectors of a complex generalized Input Parameters.
typename GetTypeReal< T >::type Real
Definition dngvd_op.h:69