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>
25 const Device* ctx,
26 const int& spin,
27 const int& nrxx,
28 const int& nrxx_dense,
29 const FPTYPE& weight,
30 FPTYPE** rho,
31 const std::complex<FPTYPE>* wfcr);
32
48 const Device* ctx,
49 const bool& DOMAG,
50 const bool& DOMAG_Z,
51 const int& nrxx,
52 const int& nrxx_dense,
53 const FPTYPE& weight,
54 FPTYPE** rho,
55 const std::complex<FPTYPE>* wfcr,
56 const std::complex<FPTYPE>* wfcr_another_spin);
57};
58
59#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
60template <typename FPTYPE>
61struct elecstate_pw_op<FPTYPE, base_device::DEVICE_GPU>
62{
63 void operator()(const base_device::DEVICE_GPU* ctx,
64 const int& spin,
65 const int& nrxx,
66 const int& nrxx_dense,
67 const FPTYPE& w1,
68 FPTYPE** rho,
69 const std::complex<FPTYPE>* wfcr);
70
71 void operator()(const base_device::DEVICE_GPU* ctx,
72 const bool& DOMAG,
73 const bool& DOMAG_Z,
74 const int& nrxx,
75 const int& nrxx_dense,
76 const FPTYPE& w1,
77 FPTYPE** rho,
78 const std::complex<FPTYPE>* wfcr,
79 const std::complex<FPTYPE>* wfcr_another_spin);
80};
81#endif
82} // namespace elecstate
83
84#endif // source_estate_ELECSTATE_MULTI_DEVICE_H
Definition device.cpp:21
Definition read_atoms_hlp_test.cpp:13
Definition elecstate_op.h:11
void operator()(const Device *ctx, const int &spin, const int &nrxx, const int &nrxx_dense, const FPTYPE &weight, FPTYPE **rho, const std::complex< FPTYPE > *wfcr)
Calculate psiToRho output within the band-by-band loop, NSPIN != 4.