[Scipy-svn] r4877 - branches/remove_fft_backends/scipy/fftpack/src

scipy-svn@scip... scipy-svn@scip...
Sat Nov 1 08:30:31 CDT 2008


Author: cdavid
Date: 2008-11-01 08:30:27 -0500 (Sat, 01 Nov 2008)
New Revision: 4877

Removed:
   branches/remove_fft_backends/scipy/fftpack/src/drfft_fftw.c
   branches/remove_fft_backends/scipy/fftpack/src/zfft_fftw.c
   branches/remove_fft_backends/scipy/fftpack/src/zfftnd_fftw.c
Log:
Remove fftw2 wrappers.

Deleted: branches/remove_fft_backends/scipy/fftpack/src/drfft_fftw.c
===================================================================
--- branches/remove_fft_backends/scipy/fftpack/src/drfft_fftw.c	2008-11-01 13:30:16 UTC (rev 4876)
+++ branches/remove_fft_backends/scipy/fftpack/src/drfft_fftw.c	2008-11-01 13:30:27 UTC (rev 4877)
@@ -1,70 +0,0 @@
-/*
- * Last Change: Wed Aug 01 07:00 PM 2007 J
- *
- * FFTW2 implementation
- *
- * Original code by Pearu Peterson.
- */
-
-GEN_CACHE(drfftw, (int n, int d, int flags)
-	  , int direction;
-	  int flags;
-	  rfftw_plan plan;
-	  double *ptr;, ((caches_drfftw[i].n == n) &&
-			 (caches_drfftw[i].direction == d) &&
-			 (caches_drfftw[i].flags == flags))
-	  , caches_drfftw[id].direction = d;
-	  caches_drfftw[id].flags = flags;
-	  caches_drfftw[id].plan = rfftw_create_plan(n,
-						     (d >
-						      0 ?
-						      FFTW_REAL_TO_COMPLEX
-						      :
-						      FFTW_COMPLEX_TO_REAL),
-						     flags);
-	  caches_drfftw[id].ptr =
-	  (double *) malloc(sizeof(double) * (n));,
-	  rfftw_destroy_plan(caches_drfftw[id].plan);
-	  free(caches_drfftw[id].ptr);, 10)
-
-static void drfft_fftw(double *inout, int n, int dir, int
-			howmany, int normalize)
-{
-    int i;
-    double *ptr = inout;
-    double *ptrc = NULL;
-    rfftw_plan plan = NULL;
-
-    i = get_cache_id_drfftw(n, dir, FFTW_IN_PLACE | FFTW_ESTIMATE);
-    plan = caches_drfftw[i].plan;
-    ptrc = caches_drfftw[i].ptr;
-
-    switch (dir) {
-    case 1:
-        for (i = 0; i < howmany; ++i, ptr += n) {
-            memcpy(ptrc, ptr, sizeof(double) * n);
-            rfftw(plan, 1, (fftw_real *) ptrc, 1, 1, NULL, 1, 1);
-            COPYRFFTW2STD(ptrc, ptr, n);
-        }
-        break;
-
-    case -1:
-        for (i = 0; i < howmany; ++i, ptr += n) {
-            COPYINVRFFTW2STD(ptr, ptrc, n);
-            rfftw(plan, 1, (fftw_real *) ptrc, 1, 1, NULL, 1, 1);
-            memcpy(ptr, ptrc, sizeof(double) * n);
-        }
-        break;
-
-    default:
-        fprintf(stderr, "drfft: invalid direction=%d\n", dir);
-    }
-
-    if (normalize) {
-        double d = 1.0 / n;
-        ptr = inout;
-        for (i = n * howmany - 1; i >= 0; --i) {
-            (*(ptr++)) *= d;
-        }
-    }
-}

Deleted: branches/remove_fft_backends/scipy/fftpack/src/zfft_fftw.c
===================================================================
--- branches/remove_fft_backends/scipy/fftpack/src/zfft_fftw.c	2008-11-01 13:30:16 UTC (rev 4876)
+++ branches/remove_fft_backends/scipy/fftpack/src/zfft_fftw.c	2008-11-01 13:30:27 UTC (rev 4877)
@@ -1,43 +0,0 @@
-GEN_CACHE(zfftw,(int n,int d)
-	  ,int direction;
-	   fftw_plan plan;
-	  ,((caches_zfftw[i].n==n) && 
-	    (caches_zfftw[i].direction==d))
-	  ,caches_zfftw[id].direction = d;
-	   caches_zfftw[id].plan = fftw_create_plan(n,
-		(d>0?FFTW_FORWARD:FFTW_BACKWARD),
-		FFTW_IN_PLACE|FFTW_ESTIMATE);
-	  ,fftw_destroy_plan(caches_zfftw[id].plan);
-	  ,10)
-
-extern void zfft_fftw(complex_double * inout, int n,
-		      int dir, int howmany, int normalize)
-{
-	int i;
-	complex_double *ptr = inout;
-	fftw_plan plan = NULL;
-	plan = caches_zfftw[get_cache_id_zfftw(n, dir)].plan;
-
-	switch (dir) {
-	case 1:
-		for (i = 0; i < howmany; ++i, ptr += n) {
-			fftw_one(plan, (fftw_complex *) ptr, NULL);
-		}
-		break;
-	case -1:
-		for (i = 0; i < howmany; ++i, ptr += n) {
-			fftw_one(plan, (fftw_complex *) ptr, NULL);
-		}
-		break;
-	default:
-		fprintf(stderr, "zfft: invalid dir=%d\n", dir);
-	}
-
-	if (normalize) {
-		ptr = inout;
-		for (i = n * howmany - 1; i >= 0; --i) {
-			*((double *) (ptr)) /= n;
-			*((double *) (ptr++) + 1) /= n;
-		}
-	}
-}

Deleted: branches/remove_fft_backends/scipy/fftpack/src/zfftnd_fftw.c
===================================================================
--- branches/remove_fft_backends/scipy/fftpack/src/zfftnd_fftw.c	2008-11-01 13:30:16 UTC (rev 4876)
+++ branches/remove_fft_backends/scipy/fftpack/src/zfftnd_fftw.c	2008-11-01 13:30:27 UTC (rev 4877)
@@ -1,53 +0,0 @@
-/*
- * fftw2 backend for multi dimensional fft
- *
- * Original code by Pearu Peaterson
- *
- * Last Change: Thu Sep 06 05:00 PM 2007 J
- */
-
-GEN_CACHE(zfftnd_fftw, (int n, int *dims, int d, int flags)
-	  , int direction;
-	  int *dims;
-	  fftwnd_plan plan;, ((caches_zfftnd_fftw[i].n == n) &&
-			      (caches_zfftnd_fftw[i].direction == d) &&
-			      (equal_dims
-			       (n, caches_zfftnd_fftw[i].dims, dims)))
-	  , caches_zfftnd_fftw[id].direction = d;
-	  caches_zfftnd_fftw[id].n = n;
-	  caches_zfftnd_fftw[id].dims = (int *) malloc(sizeof(int) * n);
-	  memcpy(caches_zfftnd_fftw[id].dims, dims, sizeof(int) * n);
-	  caches_zfftnd_fftw[id].plan =
-	  fftwnd_create_plan(n, dims,
-			     (d > 0 ? FFTW_FORWARD : FFTW_BACKWARD),
-			     flags);,
-	  fftwnd_destroy_plan(caches_zfftnd_fftw[id].plan);
-	  free(caches_zfftnd_fftw[id].dims);, 10)
-
-
-extern void zfftnd_fftw(complex_double * inout, int rank,
-		       int *dims, int direction, int howmany,
-		       int normalize)
-{
-    int i, sz;
-    complex_double *ptr = inout;
-    fftwnd_plan plan = NULL;
-
-    sz = 1;
-    for (i = 0; i < rank; ++i) {
-	sz *= dims[i];
-    }
-    i = get_cache_id_zfftnd_fftw(rank, dims, direction,
-				 FFTW_IN_PLACE | FFTW_ESTIMATE);
-    plan = caches_zfftnd_fftw[i].plan;
-    for (i = 0; i < howmany; ++i, ptr += sz) {
-	fftwnd_one(plan, (fftw_complex *) ptr, NULL);
-    }
-    if (normalize) {
-	ptr = inout;
-	for (i = sz * howmany - 1; i >= 0; --i) {
-	    *((double *) (ptr)) /= sz;
-	    *((double *) (ptr++) + 1) /= sz;
-	}
-    }
-}



More information about the Scipy-svn mailing list