mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
4196133e22
new file: projects/fftw.org/fftw.c
14 lines
No EOL
430 B
C
14 lines
No EOL
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;
|
|
} |