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
4#include "source_psi/psi.h"
5#include <complex>
6
7namespace hamilt {
8template <typename FPTYPE, typename Device>
9struct veff_pw_op {
21 const Device* dev,
22 const int& size,
23 std::complex<FPTYPE>* out,
24 const FPTYPE* in);
25
47 const Device* dev,
48 const int& size,
49 std::complex<FPTYPE>* out,
50 std::complex<FPTYPE>* out1,
51 const FPTYPE** in);
52};
53
54#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
55// Partially specialize functor for base_device::GpuDevice.
56template <typename FPTYPE>
57struct veff_pw_op<FPTYPE, base_device::DEVICE_GPU>
58{
59 void operator()(const base_device::DEVICE_GPU* dev, const int& size, std::complex<FPTYPE>* out, const FPTYPE* in);
60
61 void operator()(const base_device::DEVICE_GPU* dev,
62 const int& size,
63 std::complex<FPTYPE>* out,
64 std::complex<FPTYPE>* out1,
65 const FPTYPE** in);
66};
67#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
68} // namespace hamilt
69#endif //MODULE_HAMILT_VEFF_H
Definition device.cpp:21
Definition hamilt.h:12
Definition veff_op.h:9
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];.