Skip to content

Commit 85785a1

Browse files
committed
set pw_test
1 parent 26ff18e commit 85785a1

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

source/module_basis/module_pw/module_fft/fft_bundle.cpp

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

142139
void FFT_Bundle::resource_handler(const int flag) const
143140
{
144-
if (this->device=="dsp")
141+
if (this->device == "dsp")
145142
{
146143
if (double_flag)
147144
{
@@ -220,27 +217,23 @@ void FFT_Bundle::fftxyc2r(std::complex<double>* in, double* out) const
220217
}
221218

222219
template <>
223-
void FFT_Bundle::fft3D_forward(std::complex<float>* in,
224-
std::complex<float>* out) const
220+
void FFT_Bundle::fft3D_forward(std::complex<float>* in, std::complex<float>* out) const
225221
{
226222
fft_float->fft3D_forward(in, out);
227223
}
228224
template <>
229-
void FFT_Bundle::fft3D_forward(std::complex<double>* in,
230-
std::complex<double>* out) const
225+
void FFT_Bundle::fft3D_forward(std::complex<double>* in, std::complex<double>* out) const
231226
{
232227
fft_double->fft3D_forward(in, out);
233228
}
234229

235230
template <>
236-
void FFT_Bundle::fft3D_backward(std::complex<float>* in,
237-
std::complex<float>* out) const
231+
void FFT_Bundle::fft3D_backward(std::complex<float>* in, std::complex<float>* out) const
238232
{
239233
fft_float->fft3D_backward(in, out);
240234
}
241235
template <>
242-
void FFT_Bundle::fft3D_backward(std::complex<double>* in,
243-
std::complex<double>* out) const
236+
void FFT_Bundle::fft3D_backward(std::complex<double>* in, std::complex<double>* out) const
244237
{
245238
fft_double->fft3D_backward(in, out);
246239
}

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 = kpar = 1;
47+
nproc_in_pool=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)