Skip to content

Commit 6f84b85

Browse files
committed
fix compilation bug
1 parent ad1b78e commit 6f84b85

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

source/source_pw/module_pwdft/forces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void Forces<FPTYPE, Device>::cal_force_loc(const UnitCell& ucell,
418418

419419
if(this->device == base_device::GpuDevice)
420420
{
421-
hamilt::cal_force_loc_op<FPTYPE, base_device::DEVICE_GPU>()(
421+
hamilt::cal_force_loc_op<FPTYPE, Device>()(
422422
this->nat,
423423
rho_basis->npw,
424424
ucell.tpiba * ucell.omega,

source/source_pw/module_pwdft/kernels/force_op.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,21 @@ struct cal_force_loc_op{
164164
FPTYPE* forcelc);
165165
};
166166

167+
template <typename FPTYPE, typename Device>
168+
struct cal_force_loc_op{
169+
void operator()(
170+
const int nat,
171+
const int npw,
172+
const FPTYPE tpiba_omega,
173+
const int* iat2it,
174+
const int* ig2igg,
175+
const FPTYPE* gcar,
176+
const FPTYPE* tau,
177+
const std::complex<FPTYPE>* aux,
178+
const FPTYPE* vloc,
179+
const int vloc_nr,
180+
FPTYPE* forcelc) {};
181+
};
167182
#if __CUDA || __UT_USE_CUDA || __ROCM || __UT_USE_ROCM
168183
template <typename FPTYPE>
169184
struct cal_vkb1_nl_op<FPTYPE, base_device::DEVICE_GPU>

0 commit comments

Comments
 (0)