Skip to content

Commit 38b485c

Browse files
authored
Update exx_cal_energy_op.cu to better support GPU
fix the errors related to the "atomicAdd" function. #6547
1 parent 73fc8a9 commit 38b485c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/source_pw/module_pwdft/kernels/cuda/exx_cal_energy_op.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "source_psi/psi.h"
33

44
#include <thrust/complex.h>
5+
#include "source_base/module_device/device.h"
56

67
namespace hamilt
78
{
@@ -81,4 +82,4 @@ struct exx_cal_energy_op<std::complex<FPTYPE>, base_device::DEVICE_GPU>
8182

8283
template struct exx_cal_energy_op<std::complex<float>, base_device::DEVICE_GPU>;
8384
template struct exx_cal_energy_op<std::complex<double>, base_device::DEVICE_GPU>;
84-
} // namespace hamilt
85+
} // namespace hamilt

0 commit comments

Comments
 (0)