ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
diago_cusolver.h
Go to the documentation of this file.
1#ifndef DIAGOCUSOLVER_H
2#define DIAGOCUSOLVER_H
3
4#include "source_base/macros.h" // GetRealType
7#include "source_hsolver/kernels/cuda/diag_cusolver.cuh"
8
9namespace hsolver
10{
11
12// DiagoCusolver class for diagonalization using CUSOLVER
13template <typename T>
15{
16 private:
17 // Real is the real part of the complex type T
18 using Real = typename GetTypeReal<T>::type;
19
20 public:
21
24
25 // Override the diag function for CUSOLVER diagonalization
26 void diag(
30 Real* eigenvalue_in);
31
32 // Static variable to keep track of the decomposition state
33 static int DecomposedState;
34
35 // Diag_Cusolver_gvd object for CUSOLVER operations
36 Diag_Cusolver_gvd dc;
37
38 private:
39#ifdef __MPI
40 // Function to check if ELPA handle needs to be created or reused in MPI settings
41 bool ifElpaHandle(const bool& newIteration, const bool& ifNSCF);
42#endif
43};
44
45} // namespace hsolver
46
47#endif
Definition diago_cusolver.h:15
typename GetTypeReal< T >::type Real
Definition diago_cusolver.h:18
DiagoCusolver()
Definition diago_cusolver.cpp:23
bool ifElpaHandle(const bool &newIteration, const bool &ifNSCF)
void diag(hamilt::MatrixBlock< T > &h_mat, hamilt::MatrixBlock< T > &s_mat, psi::Psi< T > &psi, Real *eigenvalue_in)
Definition diago_cusolver.cpp:34
Diag_Cusolver_gvd dc
Definition diago_cusolver.h:36
~DiagoCusolver()
Definition diago_cusolver.cpp:28
static int DecomposedState
Definition diago_cusolver.h:33
Definition psi.h:37
Definition diag_comm_info.h:9
Definition exx_lip.h:23
T type
Definition macros.h:8
Definition matrixblock.h:9