Skip to content

Commit e240efc

Browse files
committed
Revert "set pw_test"
This reverts commit 85785a1.
1 parent d977a71 commit e240efc

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

source/module_basis/module_pw/module_fft/fft_bundle.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ void FFT_Bundle::initfft(int nx_in,
5757
}
5858
#endif
5959
}
60-
double_flag = true;
60+
if (this->precision == "double" || this->precision == "mixing")
61+
{
62+
double_flag = true;
63+
}
6164
#if defined(__DSP)
6265
if (device == "dsp")
6366
{
@@ -138,7 +141,7 @@ void FFT_Bundle::clear()
138141

139142
void FFT_Bundle::resource_handler(const int flag) const
140143
{
141-
if (this->device == "dsp")
144+
if (this->device=="dsp")
142145
{
143146
if (double_flag)
144147
{
@@ -217,23 +220,27 @@ void FFT_Bundle::fftxyc2r(std::complex<double>* in, double* out) const
217220
}
218221

219222
template <>
220-
void FFT_Bundle::fft3D_forward(std::complex<float>* in, std::complex<float>* out) const
223+
void FFT_Bundle::fft3D_forward(std::complex<float>* in,
224+
std::complex<float>* out) const
221225
{
222226
fft_float->fft3D_forward(in, out);
223227
}
224228
template <>
225-
void FFT_Bundle::fft3D_forward(std::complex<double>* in, std::complex<double>* out) const
229+
void FFT_Bundle::fft3D_forward(std::complex<double>* in,
230+
std::complex<double>* out) const
226231
{
227232
fft_double->fft3D_forward(in, out);
228233
}
229234

230235
template <>
231-
void FFT_Bundle::fft3D_backward(std::complex<float>* in, std::complex<float>* out) const
236+
void FFT_Bundle::fft3D_backward(std::complex<float>* in,
237+
std::complex<float>* out) const
232238
{
233239
fft_float->fft3D_backward(in, out);
234240
}
235241
template <>
236-
void FFT_Bundle::fft3D_backward(std::complex<double>* in, std::complex<double>* out) const
242+
void FFT_Bundle::fft3D_backward(std::complex<double>* in,
243+
std::complex<double>* out) const
237244
{
238245
fft_double->fft3D_backward(in, out);
239246
}

source/module_basis/module_pw/test_gpu/pw_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
4444
precision_flag = "double";
4545
#endif
4646
device_flag = "cpu";
47-
nproc_in_pool=1;
47+
nproc_in_pool = kpar = 1;
4848
rank_in_pool = 0;
4949
#ifdef _OPENMP
5050
// ref: https://www.fftw.org/fftw3_doc/Usage-of-Multi_002dthreaded-FFTW.html

0 commit comments

Comments
 (0)