diff --git a/Homework3/.DS_Store b/Homework3/.DS_Store index e79f3a0..118faae 100644 Binary files a/Homework3/.DS_Store and b/Homework3/.DS_Store differ diff --git a/Homework3/lib/googletest b/Homework3/lib/googletest new file mode 160000 index 0000000..200ff59 --- /dev/null +++ b/Homework3/lib/googletest @@ -0,0 +1 @@ +Subproject commit 200ff599496e20f4e39566feeaf2f6734ca7570f diff --git a/Homework3/src/fft.hh b/Homework3/src/fft.hh index b432a45..92907e0 100644 --- a/Homework3/src/fft.hh +++ b/Homework3/src/fft.hh @@ -1,48 +1,51 @@ #ifndef FFT_HH #define FFT_HH /* ------------------------------------------------------ */ #include "matrix.hh" #include "my_types.hh" -#include +#include "fftw3.h" /* ------------------------------------------------------ */ struct FFT { static Matrix transform(Matrix& m); static Matrix itransform(Matrix& m); static Matrix> computeFrequencies(int size); }; /* ------------------------------------------------------ */ inline Matrix FFT::transform(Matrix& m_in) { - fftw_complex* C_in, C_out; + fftw_complex* C_in; + fftw_complex* C_out; UInt length = m_in.size()*m_in.size(); UInt rows = m_in.rows(); UInt columns = m_in.cols(); + C_in = new fftw_complex [length]; C_out = new fftw_complex [length]; + fftw_plan forward_plan; forward_plan = fftw_plan_dft_2d(rows, columns, C_in, C_out); } /* ------------------------------------------------------ */ inline Matrix FFT::itransform(Matrix& m_in) { } /* ------------------------------------------------------ */ /* ------------------------------------------------------ */ inline Matrix> FFT::computeFrequencies(int size) { } #endif // FFT_HH