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
9{
10template <typename FPTYPE, typename Device>
12{
24 const Device *dev,
25 const int &size,
26 std::complex<FPTYPE> *out,
27 const FPTYPE *in);
28
50 const Device *dev,
51 const int &size,
52 std::complex<FPTYPE> *out,
53 std::complex<FPTYPE> *out1,
54 const FPTYPE **in);
55};
56
57#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
58// Partially specialize functor for base_device::GpuDevice.
59template <typename FPTYPE>
60struct veff_pw_op<FPTYPE, base_device::DEVICE_GPU>
61{
62 void operator()(
63 const base_device::DEVICE_GPU *dev,
64 const int &size,
65 std::complex<FPTYPE> *out,
66 const FPTYPE *in);
67
68 void operator()(
69 const base_device::DEVICE_GPU *dev,
70 const int &size,
71 std::complex<FPTYPE> *out,
72 std::complex<FPTYPE> *out1,
73 const FPTYPE **in);
74};
75#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
76} // namespace hamilt
77#endif // MODULE_HAMILT_VEFF_H
Definition device.cpp:21
Definition wf_op.cpp:6
Definition veff_op.h:12
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];.
void operator()(const Device *dev, const int &size, std::complex< FPTYPE > *out, std::complex< FPTYPE > *out1, const FPTYPE **in)
Compute the effective potential of hPsi in real space with NSPIN > 2,.