ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
elecstate_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.
4#ifndef source_estate_ELECSTATE_MULTI_DEVICE_H
5#define source_estate_ELECSTATE_MULTI_DEVICE_H
6#include <complex>
7#include "source_psi/psi.h"
8
9namespace elecstate{
10
11template <typename FPTYPE, typename Device>
25 const Device* ctx,
26 const int& spin,
27 const int& nrxx,
28 const FPTYPE& weight,
29 FPTYPE** rho,
30 const std::complex<FPTYPE>* wfcr);
31
46 const Device* ctx,
47 const bool& DOMAG,
48 const bool& DOMAG_Z,
49 const int& nrxx,
50 const FPTYPE& weight,
51 FPTYPE** rho,
52 const std::complex<FPTYPE>* wfcr,
53 const std::complex<FPTYPE>* wfcr_another_spin);
54};
55
56#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
57template <typename FPTYPE>
58struct elecstate_pw_op<FPTYPE, base_device::DEVICE_GPU>
59{
60 void operator()(const base_device::DEVICE_GPU* ctx,
61 const int& spin,
62 const int& nrxx,
63 const FPTYPE& w1,
64 FPTYPE** rho,
65 const std::complex<FPTYPE>* wfcr);
66
67 void operator()(const base_device::DEVICE_GPU* ctx,
68 const bool& DOMAG,
69 const bool& DOMAG_Z,
70 const int& nrxx,
71 const FPTYPE& w1,
72 FPTYPE** rho,
73 const std::complex<FPTYPE>* wfcr,
74 const std::complex<FPTYPE>* wfcr_another_spin);
75};
76#endif
77} // namespace elecstate
78
79#endif // source_estate_ELECSTATE_MULTI_DEVICE_H
Definition device.cpp:21
Definition cal_dm.h:10
Definition elecstate_op.h:12
void operator()(const Device *ctx, const int &spin, const int &nrxx, const FPTYPE &weight, FPTYPE **rho, const std::complex< FPTYPE > *wfcr)
Calculate psiToRho output within the band-by-band loop, NSPIN != 4.