ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
veff_op.h
Go to the documentation of this file.
1#ifndef MODULE_HAMILT_VEFF_H
2#define MODULE_HAMILT_VEFF_H
3
5#include "source_psi/psi.h"
6#include <complex>
7
8namespace hamilt {
9template <typename FPTYPE, typename Device>
10struct veff_pw_op {
22 const Device* dev,
23 const int& size,
24 std::complex<FPTYPE>* out,
25 const FPTYPE* in);
26
48 const Device* dev,
49 const int& size,
50 std::complex<FPTYPE>* out,
51 std::complex<FPTYPE>* out1,
52 const FPTYPE** in);
53};
54
55#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
56// Partially specialize functor for base_device::GpuDevice.
57template <typename FPTYPE>
58struct veff_pw_op<FPTYPE, base_device::DEVICE_GPU>
59{
60 void operator()(const base_device::DEVICE_GPU* dev, const int& size, std::complex<FPTYPE>* out, const FPTYPE* in);
61
62 void operator()(const base_device::DEVICE_GPU* dev,
63 const int& size,
64 std::complex<FPTYPE>* out,
65 std::complex<FPTYPE>* out1,
66 const FPTYPE** in);
67};
68#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
69} // namespace hamilt
70#endif //MODULE_HAMILT_VEFF_H
Definition device.cpp:21
Definition hamilt.h:13
Definition veff_op.h:10
void operator()(const Device *dev, const int &size, std::complex< FPTYPE > *out, const FPTYPE *in)
Compute the effective potential of hPsi in real space, out[ir] *= in[ir];.