Skip to content

Commit ccb2a1f

Browse files
committed
update the duc compile
1 parent 203c66d commit ccb2a1f

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

source/module_base/module_device/rocm/memory_op.hip.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ template struct cast_memory_op<std::complex<double>,
219219
std::complex<float>,
220220
base_device::DEVICE_GPU,
221221
base_device::DEVICE_GPU>;
222+
template struct cast_memory_op<std::complex<float>, float, base_device::DEVICE_GPU, base_device::DEVICE_GPU>;
223+
template struct cast_memory_op<std::complex<double>, double, base_device::DEVICE_GPU, base_device::DEVICE_GPU>;
222224
template struct cast_memory_op<float, float, base_device::DEVICE_GPU, base_device::DEVICE_CPU>;
223225
template struct cast_memory_op<double, double, base_device::DEVICE_GPU, base_device::DEVICE_CPU>;
224226
template struct cast_memory_op<float, double, base_device::DEVICE_GPU, base_device::DEVICE_CPU>;

source/module_basis/module_pw/module_fft/fft_bundle.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ void FFT_Bundle::initfft(int nx_in,
8989
if (device=="gpu")
9090
{
9191
#if defined(__ROCM)
92-
fft_float = new FFT_RCOM<float>();
92+
fft_float = make_unique<FFT_RCOM<float>>();
9393
fft_float->initfft(nx_in,ny_in,nz_in);
94-
fft_double = new FFT_RCOM<double>();
94+
fft_double = make_unique<FFT_RCOM<double>>();
9595
fft_double->initfft(nx_in,ny_in,nz_in);
9696
#elif defined(__CUDA)
9797
fft_float = make_unique<FFT_CUDA<float>>();
9898
fft_float->initfft(nx_in,ny_in,nz_in);
99-
fft_double = make_unique<FFT_CUDA<double>>();
99+
fft_double = make_unique<FFT_RCOM<double>>();
100100
fft_double->initfft(nx_in,ny_in,nz_in);
101101
#endif
102102
}

source/module_basis/module_pw/module_fft/fft_rcom.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
namespace ModulePW
77
{
88
template <typename FPTYPE>
9-
class FFT_ROCM : public FFT_BASE<FPTYPE>
9+
class FFT_RCOM : public FFT_BASE<FPTYPE>
1010
{
1111
public:
12-
FFT_ROCM(){};
13-
~FFT_ROCM(){};
12+
FFT_RCOM(){};
13+
~FFT_RCOM(){};
1414

1515
void setupFFT() override;
1616

@@ -58,8 +58,8 @@ class FFT_ROCM : public FFT_BASE<FPTYPE>
5858

5959
};
6060
template FFT_RCOM<float>::FFT_RCOM();
61-
template FFT_ROCM<float>::~FFT_ROCM();
61+
template FFT_RCOM<float>::~FFT_RCOM();
6262
template FFT_RCOM<double>::FFT_RCOM();
63-
template FFT_ROCM<double>::~FFT_ROCM();
63+
template FFT_RCOM<double>::~FFT_RCOM();
6464
}// namespace ModulePW
6565
#endif

0 commit comments

Comments
 (0)