Skip to content

Commit 6e151a2

Browse files
committed
set the dsp ig2ixyz_k_cpu
1 parent 18a64b6 commit 6e151a2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/module_basis/module_pw/pw_basis_k.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void PW_Basis_K::setuptransform()
188188
#if defined(__DSP)
189189
this->fft_bundle.setfft("dsp",this->precision);
190190
#else
191-
this->fft_bundle.setfft("cpu",this->precision);
191+
this->fft_bundle.setfft(this->device,this->precision);
192192
#endif
193193
if(this->xprime){
194194
this->fft_bundle.initfft(this->nx,this->ny,this->nz,this->lix,this->rix,this->nst,this->nplane,this->poolnproc,this->gamma_only, this->xprime);
@@ -338,11 +338,13 @@ int& PW_Basis_K::getigl2ig(const int ik, const int igl) const
338338

339339
void PW_Basis_K::get_ig2ixyz_k()
340340
{
341-
// if (this->device != "gpu")
342-
// {
343-
// //only GPU need to get ig2ixyz_k
344-
// return;
345-
// }
341+
#if not defined(__DSP)
342+
if (this->device != "gpu")
343+
{
344+
//only GPU need to get ig2ixyz_k
345+
return;
346+
}
347+
#endif
346348
ig2ixyz_k_cpu.resize(this->npwk_max * this->nks);
347349
ModuleBase::Memory::record("PW_B_K::ig2ixyz", sizeof(int) * this->npwk_max * this->nks);
348350
assert(gamma_only == false); //We only finish non-gamma_only fft on GPU temperarily.

0 commit comments

Comments
 (0)