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.
3#ifndef source_estate_ELECSTATE_MULTI_DEVICE_H
4#define source_estate_ELECSTATE_MULTI_DEVICE_H
5#include <complex>
6#include "source_psi/psi.h"
7
8namespace elecstate{
9
10template <typename FPTYPE, typename Device>
24 const Device* ctx,
25 const int& spin,
26 const int& nrxx,
27 const FPTYPE& weight,
28 FPTYPE** rho,
29 const std::complex<FPTYPE>* wfcr);
30
45 const Device* ctx,
46 const bool& DOMAG,
47 const bool& DOMAG_Z,
48 const int& nrxx,
49 const FPTYPE& weight,
50 FPTYPE** rho,
51 const std::complex<FPTYPE>* wfcr,
52 const std::complex<FPTYPE>* wfcr_another_spin);
53};
54
55#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
56template <typename FPTYPE>
57struct elecstate_pw_op<FPTYPE, base_device::DEVICE_GPU>
58{
59 void operator()(const base_device::DEVICE_GPU* ctx,
60 const int& spin,
61 const int& nrxx,
62 const FPTYPE& w1,
63 FPTYPE** rho,
64 const std::complex<FPTYPE>* wfcr);
65
66 void operator()(const base_device::DEVICE_GPU* ctx,
67 const bool& DOMAG,
68 const bool& DOMAG_Z,
69 const int& nrxx,
70 const FPTYPE& w1,
71 FPTYPE** rho,
72 const std::complex<FPTYPE>* wfcr,
73 const std::complex<FPTYPE>* wfcr_another_spin);
74};
75#endif
76} // namespace elecstate
77
78#endif // source_estate_ELECSTATE_MULTI_DEVICE_H
Definition device.cpp:21
Definition read_atoms_helper_test.cpp:11
Definition elecstate_op.h:11
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.