@@ -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
139142void 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
219222template <>
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}
224228template <>
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
230235template <>
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}
235241template <>
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}
0 commit comments