Skip to content

Commit 7d5d77c

Browse files
committed
modify the include file
1 parent 09769ef commit 7d5d77c

File tree

4 files changed

+1
-17
lines changed

4 files changed

+1
-17
lines changed

source/module_base/module_device/cuda/memory_op.cu

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,6 @@ void synchronize_memory_op<FPTYPE, base_device::DEVICE_GPU, base_device::DEVICE_
112112
cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, cudaMemcpyDeviceToDevice));
113113
}
114114

115-
template <typename FPTYPE>
116-
void synchronize_memory_op<FPTYPE, base_device::DEVICE_GPU, base_device::DEVICE_GPU>::operator()(
117-
std::complex<FPTYPE>* arr_out,
118-
const FPTYPE* arr_in,
119-
const size_t size)
120-
{
121-
const int block = (size + THREADS_PER_BLOCK - 1) / THREADS_PER_BLOCK;
122-
cast_memory<<<block, THREADS_PER_BLOCK>>>(arr_out,arr_in,size);
123-
// cudaErrcheck(cudaMemcpy(arr_out, arr_in, sizeof(FPTYPE) * size, cudaMemcpyDeviceToDevice));
124-
}
125-
126115
template <typename FPTYPE_out, typename FPTYPE_in>
127116
struct cast_memory_op<FPTYPE_out, FPTYPE_in, base_device::DEVICE_GPU, base_device::DEVICE_GPU>
128117
{

source/module_base/module_device/memory_op.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ struct synchronize_memory_op<FPTYPE, base_device::DEVICE_GPU, base_device::DEVIC
133133
void operator()(FPTYPE* arr_out,
134134
const FPTYPE* arr_in,
135135
const size_t size);
136-
137-
void operator()(std::complex<FPTYPE>* arr_out,
138-
const FPTYPE* arr_in,
139-
const size_t size);
140136

141137
};
142138

source/module_basis/module_pw/pw_transform_gpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void PW_Basis::real2recip_gpu(const FPTYPE* in, std::complex<FPTYPE>* out, const
1010
ModuleBase::timer::tick(this->classname, "real_to_recip gpu");
1111
assert(this->poolnproc == 1);
1212
const size_t size = this->nrxx;
13-
base_device::memory::synchronize_memory_op<FPTYPE, base_device::DEVICE_GPU, base_device::DEVICE_GPU>()(
13+
base_device::memory::cast_memory_op<std::complex<FPTYPE>, FPTYPE,base_device::DEVICE_GPU, base_device::DEVICE_GPU>()(
1414
this->fft_bundle.get_auxr_3d_data<FPTYPE>(),
1515
in,
1616
size);

source/module_elecstate/module_charge/charge_mixing_rho.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "charge_mixing.h"
2-
#include "module_base/module_device/memory_op.h"
32
#include "module_parameter/parameter.h"
43
#include "module_base/timer.h"
54
#include "module_hamilt_pw/hamilt_pwdft/global.h"

0 commit comments

Comments
 (0)