mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 18:45:19 +03:00
14 lines
430 B
C
14 lines
430 B
C
|
#include <fftw3.h>
|
||
|
int main(int argc, char* *argv)
|
||
|
{
|
||
|
fftw_complex *in, *out;
|
||
|
fftw_plan p;
|
||
|
long N = 1;
|
||
|
in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
|
||
|
out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
|
||
|
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
|
||
|
fftw_execute(p); /* repeat as needed */
|
||
|
fftw_destroy_plan(p);
|
||
|
fftw_free(in); fftw_free(out);
|
||
|
return 0;
|
||
|
}
|