diff fft/nayukic/fft.h @ 33:bbf5d4e825eb

Hack in an alternative float-only version (no faster)
author Chris Cannam
date Mon, 09 Nov 2015 12:22:00 +0000
parents ebc87a62321d
children
line wrap: on
line diff
--- a/fft/nayukic/fft.h	Mon Nov 09 11:46:47 2015 +0000
+++ b/fft/nayukic/fft.h	Mon Nov 09 12:22:00 2015 +0000
@@ -43,6 +43,8 @@
  */
 int transform_radix2(double real[], double imag[], size_t n);
 
+/* Test versions with precalculated structures -- this API is
+   absolutely not for production use! */
 typedef struct {
     double *cos;
     double *sin;
@@ -53,6 +55,16 @@
 void dispose(tables *);
 void transform_radix2_precalc(double real[], double imag[], int n, tables *tables);
 
+typedef struct {
+    float *cos;
+    float *sin;
+    int levels;
+} tables_f;
+
+tables_f *precalc_f(size_t n);
+void dispose_f(tables_f *);
+void transform_radix2_precalc_f(float real[], float imag[], int n, tables_f *tables);
+
 /* 
  * Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector.
  * The vector can have any length. This requires the convolution function, which in turn requires the radix-2 FFT function.