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{
41 void operator()(const Device* ctx,
42 const int& ntype,
43 const int& npw,
44 const int& npwx,
45 const int& nhm,
46 const int& tab_2,
47 const int& tab_3,
48 const int* atom_na,
49 const int* atom_nb,
50 const int* atom_nh,
51 const FPTYPE& DQ,
52 const FPTYPE& tpiba,
53 const std::complex<FPTYPE>& NEG_IMAG_UNIT,
54 const FPTYPE* gk,
55 const FPTYPE* ylm,
56 const FPTYPE* indv,
57 const FPTYPE* nhtol,
58 const FPTYPE* nhtolm,
59 const FPTYPE* tab,
60 FPTYPE* vkb1,
61 const std::complex<FPTYPE>* sk,
62 std::complex<FPTYPE>* vkb_in);
63};
64
65#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
66template <typename FPTYPE>
67struct cal_vnl_op<FPTYPE, base_device::DEVICE_GPU>
68{
69 void operator()(const base_device::DEVICE_GPU* ctx,
70 const int& ntype,
71 const int& npw,
72 const int& npwx,
73 const int& nhm,
74 const int& tab_2,
75 const int& tab_3,
76 const int* atom_na,
77 const int* atom_nb,
78 const int* atom_nh,
79 const FPTYPE& DQ,
80 const FPTYPE& tpiba,
81 const std::complex<FPTYPE>& NEG_IMAG_UNIT,
82 const FPTYPE* gk,
83 const FPTYPE* ylm,
84 const FPTYPE* indv,
85 const FPTYPE* nhtol,
86 const FPTYPE* nhtolm,
87 const FPTYPE* tab,
88 FPTYPE* vkb1,
89 const std::complex<FPTYPE>* sk,
90 std::complex<FPTYPE>* vkb_in);
91};
92#endif // __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
93} // namespace hamilt
94#endif // W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_KERNELS_VNL_OP_H
Definition device.cpp:21
Definition hamilt.h:13
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.