ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
vnl_op.h
Go to the documentation of this file.
1#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H
2#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H
3
5#include "source_psi/psi.h"
6
7#include <complex>
8
9namespace hamilt
10{
11
12template <typename FPTYPE, typename Device>
14{
42 const Device *ctx,
43 const int &ntype,
44 const int &npw,
45 const int &npwx,
46 const int &nhm,
47 const int &tab_2,
48 const int &tab_3,
49 const int *atom_na,
50 const int *atom_nb,
51 const int *atom_nh,
52 const FPTYPE &DQ,
53 const FPTYPE &tpiba,
54 const std::complex<FPTYPE> &NEG_IMAG_UNIT,
55 const FPTYPE *gk,
56 const FPTYPE *ylm,
57 const FPTYPE *indv,
58 const FPTYPE *nhtol,
59 const FPTYPE *nhtolm,
60 const FPTYPE *tab,
61 FPTYPE *vkb1,
62 const std::complex<FPTYPE> *sk,
63 std::complex<FPTYPE> *vkb_in);
64};
65
66#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
67template <typename FPTYPE>
68struct cal_vnl_op<FPTYPE, base_device::DEVICE_GPU>
69{
70 void operator()(
71 const base_device::DEVICE_GPU *ctx,
72 const int &ntype,
73 const int &npw,
74 const int &npwx,
75 const int &nhm,
76 const int &tab_2,
77 const int &tab_3,
78 const int *atom_na,
79 const int *atom_nb,
80 const int *atom_nh,
81 const FPTYPE &DQ,
82 const FPTYPE &tpiba,
83 const std::complex<FPTYPE> &NEG_IMAG_UNIT,
84 const FPTYPE *gk,
85 const FPTYPE *ylm,
86 const FPTYPE *indv,
87 const FPTYPE *nhtol,
88 const FPTYPE *nhtolm,
89 const FPTYPE *tab,
90 FPTYPE *vkb1,
91 const std::complex<FPTYPE> *sk,
92 std::complex<FPTYPE> *vkb_in);
93};
94#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
95} // namespace hamilt
96#endif // W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H
Definition device.cpp:21
Definition wf_op.cpp:6
Definition vnl_op.h:14
void operator()(const Device *ctx, const int &ntype, const int &npw, const int &npwx, const int &nhm, const int &tab_2, const int &tab_3, const int *atom_na, const int *atom_nb, const int *atom_nh, const FPTYPE &DQ, const FPTYPE &tpiba, const std::complex< FPTYPE > &NEG_IMAG_UNIT, const FPTYPE *gk, const FPTYPE *ylm, const FPTYPE *indv, const FPTYPE *nhtol, const FPTYPE *nhtolm, const FPTYPE *tab, FPTYPE *vkb1, const std::complex< FPTYPE > *sk, std::complex< FPTYPE > *vkb_in)
Calculate the getvnl for multi-device.