From 585ca79e105c6e8ca57a2320c2335623a184ae06 Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Tue, 5 Jun 2012 09:32:22 +0000 Subject: improved check for fftw svn path=/trunk/externals/iem/iemmatrix/; revision=16149 --- src/mtx_rifft.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/mtx_rifft.c') diff --git a/src/mtx_rifft.c b/src/mtx_rifft.c index 27adc24..3f41637 100644 --- a/src/mtx_rifft.c +++ b/src/mtx_rifft.c @@ -15,13 +15,13 @@ #include "iemmatrix.h" #include -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW #include #endif static t_class *mtx_rifft_class; -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW enum ComplexPart { REALPART=0, IMAGPART=1}; #endif @@ -34,7 +34,7 @@ typedef struct _MTXRifft_ int size; int size2; t_float renorm_fac; -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW fftw_plan *fftplan; fftw_complex *f_in; double *f_out; @@ -90,7 +90,7 @@ static void ifftPrepareReal (int n, t_float *re, t_float *im) *++re = -*--im; } -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW static void readFFTWComplexPartFromList (int n, t_atom *l, fftw_complex *f, enum ComplexPart p) { for (;n--;) @@ -133,7 +133,7 @@ static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s, int size = rows * columns; int ifft_count; t_atom *list_re = x->list_re; -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW fftw_complex *f_in = x->f_in; double *f_out = x->f_out; #else @@ -153,7 +153,7 @@ static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s, else if (columns == (1 << ilog2(columns))) { /* memory things */ -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW if ((x->rows!=rows)||(columns!=x->columns)){ for (ifft_count=0;ifft_countrows;ifft_count++) { fftw_destroy_plan(x->fftplan[ifft_count]); @@ -192,7 +192,7 @@ static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s, ifft_count = rows; x->renorm_fac = 1.0f / columns; for (ifft_count=0;ifft_countsize2; int ifft_count; -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW fftw_complex *f_in = x->f_in; #else t_float *f_re = x->f_re; @@ -235,7 +235,7 @@ static void mTXRifftMatrixHot (MTXRifft *x, t_symbol *s, post("mtx_rifft: invalid right side matrix"); else { /* main part */ for (ifft_count=0;ifft_countfftplan[ifft_count]); f_in+=columns_re; @@ -248,14 +248,14 @@ static void mTXRifftMatrixHot (MTXRifft *x, t_symbol *s, #endif argv += columns_re; } -#ifndef HAVE_FFTW3_H +#ifndef USE_FFTW f_re = x->f_re; #endif size2 = x->size2; SETFLOAT(x->list_re, rows); SETFLOAT(x->list_re+1, x->columns); -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW multiplyDoubleVector (size, x->f_out, renorm_fac); writeDoubleIntoList (size, x->list_re+2, x->f_out); #else @@ -276,7 +276,7 @@ static void mTXRifftBang (MTXRifft *x) static void deleteMTXRifft (MTXRifft *x) { -#ifdef HAVE_FFTW3_H +#ifdef USE_FFTW int n; if (x->fftplan) { for (n=0; nrows; n++) -- cgit v1.2.1