Skip to content

Commit dfaad66

Browse files
committed
add the float fft
1 parent 9ad3c19 commit dfaad66

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

source/module_base/module_fft/fft_cpu.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@
77

88
template <>
99
FFT_CPU<double>::FFT_CPU()
10-
{
11-
10+
{
1211
}
1312
template <>
1413
FFT_CPU<double>::~FFT_CPU()
1514
{
16-
1715
}
18-
16+
template <>
17+
FFT_CPU<float>::FFT_CPU()
18+
{
19+
}
20+
template <>
21+
FFT_CPU<float>::~FFT_CPU()
22+
{
23+
}
1924
template <>
2025
void FFT_CPU<double>::setupFFT()
2126
{
@@ -293,15 +298,8 @@ void FFT_CPU<double>::fftxyc2r(std::complex<double> *in,double *out) const
293298
}
294299
}
295300
}
296-
template <>
297-
FFT_CPU<float>::FFT_CPU()
298-
{
299-
300-
}
301-
template <>
302-
FFT_CPU<float>::~FFT_CPU()
303-
{
304301

305-
}
306302
template FFT_CPU<float>::FFT_CPU();
303+
template FFT_CPU<float>::~FFT_CPU();
307304
template FFT_CPU<double>::FFT_CPU();
305+
template FFT_CPU<double>::~FFT_CPU();

source/module_base/module_fft/fft_cpu_float.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,5 +293,3 @@ void FFT_CPU<float>::fftxyc2r(std::complex<float>* in, float* out) const
293293
fftwf_execute_dft_c2r(this->planfyc2r, (fftwf_complex*)in, out);
294294
}
295295
}
296-
// template FFT_CPU<float>::~FFT_CPU();
297-
// template FFT_CPU<float>::FFT_CPU();

source/module_base/module_fft/fft_temp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// #include "fft_gpu.h"
1313
FFT_TEMP::FFT_TEMP()
1414
{
15-
fft_float = nullptr;
16-
fft_double = nullptr;
1715
}
1816
FFT_TEMP::FFT_TEMP(std::string device_in,std::string precision_in)
1917
{

0 commit comments

Comments
 (0)