pantry/projects/fftw.org/fftw.c
andrejrabcenko 4196133e22 new file: projects/fftw.org/package.yml
new file:   projects/fftw.org/fftw.c
2023-09-25 09:08:30 -04:00

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;
}