[Scipy-svn] r4271 - in branches/refactor_fft/scipy/fftpack: . src src/djbfft src/fftpack src/fftw src/fftw3 src/mkl
scipy-svn at scipy.org
scipy-svn at scipy.org
Sun May 11 09:06:00 EDT 2008
Author: cdavid
Date: 2008-05-11 08:05:41 -0500 (Sun, 11 May 2008)
New Revision: 4271
Modified:
branches/refactor_fft/scipy/fftpack/basic.py
branches/refactor_fft/scipy/fftpack/fftpack.pyf
branches/refactor_fft/scipy/fftpack/src/djbfft/drfft.cxx
branches/refactor_fft/scipy/fftpack/src/djbfft/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/drfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftpack/drfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftpack/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftpack/zfftnd.cxx
branches/refactor_fft/scipy/fftpack/src/fftw/drfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftw/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftw/zfftnd.cxx
branches/refactor_fft/scipy/fftpack/src/fftw3/drfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/fftw3/zfftnd.cxx
branches/refactor_fft/scipy/fftpack/src/mkl/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/mkl/zfftnd.cxx
branches/refactor_fft/scipy/fftpack/src/zfft.cxx
branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx
Log:
remove destroy cache stub for fftpack (all backends).
Modified: branches/refactor_fft/scipy/fftpack/basic.py
===================================================================
--- branches/refactor_fft/scipy/fftpack/basic.py 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/basic.py 2008-05-11 13:05:41 UTC (rev 4271)
@@ -12,12 +12,6 @@
import numpy
import _fftpack as fftpack
-import atexit
-atexit.register(fftpack.destroy_zfft_cache)
-atexit.register(fftpack.destroy_zfftnd_cache)
-atexit.register(fftpack.destroy_drfft_cache)
-del atexit
-
def istype(arr, typeclass):
return issubclass(arr.dtype.type, typeclass)
Modified: branches/refactor_fft/scipy/fftpack/fftpack.pyf
===================================================================
--- branches/refactor_fft/scipy/fftpack/fftpack.pyf 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/fftpack.pyf 2008-05-11 13:05:41 UTC (rev 4271)
@@ -71,18 +71,6 @@
}
end subroutine zfftnd
- subroutine destroy_zfft_cache()
- intent(c) destroy_zfft_cache
- end subroutine destroy_zfft_cache
-
- subroutine destroy_zfftnd_cache()
- intent(c) destroy_zfftnd_cache
- end subroutine destroy_zfftnd_cache
-
- subroutine destroy_drfft_cache()
- intent(c) destroy_drfft_cache
- end subroutine destroy_drfft_cache
-
end interface
end python module _fftpack
Modified: branches/refactor_fft/scipy/fftpack/src/djbfft/drfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/djbfft/drfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/djbfft/drfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -1,13 +1,13 @@
/*
- * Last Change: Sun May 11 08:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*
* Original code by Pearu Peterson.
*/
+
/*
* RDJBFFT only implements size 2^N !
*
- * drfft_def and drfft_def_destroy_cache are the functions used for size different
- * than 2^N
+ * drfft_def is the functions used for size different * than 2^N
*/
#include <new>
#include <cassert>
@@ -16,13 +16,10 @@
#ifdef WITH_FFTW3
#define drfft_def drfft_fftw3
-#define drfft_def_destroy_cache destroy_drfftw3_caches
#elif defined WITH_FFTW
#define drfft_def drfft_fftw
-#define drfft_def_destroy_cache destroy_drfftw_caches
#else
#define drfft_def drfft_fftpack
-#define drfft_def_destroy_cache destroy_drfftpack_caches
#endif
using namespace fft;
@@ -126,11 +123,6 @@
static CacheManager<DJBFFTCacheId, RDJBFFTCache> rdjbfft_cmgr(10);
-/* Stub to make GEN_PUBLIC_API happy */
-static void destroy_drdjbfft_caches()
-{
-}
-
/**************** ZFFT function **********************/
static void drfft_djbfft(double * inout,
int n, int direction, int howmany, int normalize)
Modified: branches/refactor_fft/scipy/fftpack/src/djbfft/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/djbfft/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/djbfft/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -1,24 +1,19 @@
/*
* DJBFFT only implements size 2^N !
*
-* zfft_def and zfft_def_destroy_cache are the functions
-* used for size different than 2^N
+* zfft_def is the function * used for size different than 2^N
*/
#include "common.h"
#ifdef WITH_FFTWORK
#define zfft_def zfft_fftwork
-#define zfft_def_destroy_cache destroy_zfftwork_cache
#elif defined WITH_FFTW3
#define zfft_def zfft_fftw3
-#define zfft_def_destroy_cache destroy_zfftw3_caches
#elif defined WITH_FFTW
#define zfft_def zfft_fftw
-#define zfft_def_destroy_cache destroy_zfftw_caches
#else
#define zfft_def zfft_fftpack
-#define zfft_def_destroy_cache destroy_zfftpack_caches
#endif
class DJBFFTCache: public Cache<DJBFFTCacheId> {
@@ -166,11 +161,6 @@
static CacheManager<DJBFFTCacheId, DJBFFTCache> djbfft_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_zdjbfft_caches()
-{
-}
-
/**************** ZFFT function **********************/
static void zfft_djbfft(complex_double * inout,
int n, int direction, int howmany, int normalize)
Modified: branches/refactor_fft/scipy/fftpack/src/drfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/drfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/drfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -9,11 +9,6 @@
/* The following macro convert private backend specific function to the public
* functions exported by the module */
#define GEN_PUBLIC_API(name) \
-extern "C" void destroy_drfft_cache(void)\
-{\
- destroy_dr##name##_caches();\
-}\
-\
extern "C" void drfft(double *inout, int n, \
int direction, int howmany, int normalize)\
{\
@@ -58,11 +53,6 @@
*/
#ifdef WITH_DJBFFT
#include "djbfft/drfft.cxx"
- extern "C" void destroy_drfft_cache(void)
- {
- destroy_drdjbfft_caches();
- drfft_def_destroy_cache();
- }
extern "C" void drfft(double *inout, int n,
int direction, int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftpack/drfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftpack/drfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftpack/drfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -75,13 +75,6 @@
static CacheManager<RFFTPackCacheId, RFFTPackCache> rfftpack_cmgr(10);
-/*
- * Stub to make GEN_PUBLIC_API api
- */
-static void destroy_drfftpack_caches()
-{
-}
-
static void drfft_fftpack(double *inout, int n, int direction, int howmany,
int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftpack/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftpack/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftpack/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -68,10 +68,6 @@
static CacheManager<FFTPackCacheId, FFTPackCache> fftpack_cmgr(10);
-void destroy_zfftpack_caches()
-{
-}
-
static void zfft_fftpack(complex_double * inout,
int n, int direction, int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftpack/zfftnd.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftpack/zfftnd.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftpack/zfftnd.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -136,11 +136,6 @@
static CacheManager<NDFFTPackCacheId, NDFFTPackCache> ndfftpack_cmgr(10);
-/* stub to make PUBLIC_GEN_API happy */
-static void destroy_zfftnd_fftpack_caches()
-{
-}
-
static
/*inline : disabled because MSVC6.0 fails to compile it. */
int next_comb(int *ia, int *da, int m)
Modified: branches/refactor_fft/scipy/fftpack/src/fftw/drfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw/drfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw/drfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -1,5 +1,5 @@
/*
- * Last Change: Sun May 11 07:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*
* FFTW2 implementation
*
@@ -101,11 +101,6 @@
CacheManager<RFFTWCacheId, RFFTWCache> rfftw_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_drfftw_caches()
-{
-}
-
static void drfft_fftw(double *inout, int n, int dir,
int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftw/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -64,11 +64,6 @@
CacheManager<FFTWCacheId, FFTWCache> fftw_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_zfftw_caches()
-{
-}
-
extern void zfft_fftw(complex_double * inout, int n,
int dir, int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftw/zfftnd.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw/zfftnd.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw/zfftnd.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -3,7 +3,7 @@
*
* Original code by Pearu Peaterson
*
- * Last Change: Sun May 11 07:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*/
#include <new>
#include <cassert>
@@ -146,11 +146,6 @@
static CacheManager < NDFFTWCacheId, NDFFTWCache > fftwnd_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_zfftnd_fftw_caches()
-{
-}
-
extern void zfftnd_fftw(complex_double * inout, int rank,
int *dims, int direction, int howmany,
int normalize)
Modified: branches/refactor_fft/scipy/fftpack/src/fftw3/drfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw3/drfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw3/drfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -1,5 +1,5 @@
/*
- * Last Change: Sun May 11 05:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*
* RFFTW3 implementation
*
@@ -88,11 +88,6 @@
static CacheManager<FFTW3CacheId, RFFTW3Cache> fftw3_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_drfftw3_caches()
-{
-}
-
static void drfft_fftw3(double *inout, int n, int direction, int
howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -62,11 +62,6 @@
static CacheManager<FFTW3CacheId, FFTW3Cache> fftw3_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_zfftw3_caches()
-{
-}
-
static void zfft_fftw3(complex_double * inout, int n, int dir, int howmany,
int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/fftw3/zfftnd.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw3/zfftnd.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/fftw3/zfftnd.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -3,7 +3,7 @@
*
* Original code by Pearu Peaterson
*
- * Last Change: Sun May 11 06:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*/
#include <new>
#include <cassert>
@@ -103,11 +103,6 @@
return res;
}
-/* stub because fftw3 has no cache mechanism (yet) */
-static void destroy_zfftnd_fftw3_caches(void)
-{
-}
-
class NDFFTW3Cache:public Cache < NDFFTW3CacheId > {
public:
NDFFTW3Cache(const NDFFTW3CacheId & id);
Modified: branches/refactor_fft/scipy/fftpack/src/mkl/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/mkl/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/mkl/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -52,10 +52,6 @@
CacheManager<MKLCacheId, MKLCache> mkl_cmgr(10);
-void destroy_zmkl_caches()
-{
-}
-
static void zfft_mkl(complex_double * inout,
int n, int direction, int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/mkl/zfftnd.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/mkl/zfftnd.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/mkl/zfftnd.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -3,7 +3,7 @@
*
* Original code by David M. Cooke
*
- * Last Change: Sun May 11 07:00 PM 2008 J
+ * Last Change: Sun May 11 09:00 PM 2008 J
*/
#include <new>
@@ -157,11 +157,6 @@
static CacheManager < NDMKLCacheId, NDMKLCache > mkl_cmgr(10);
-/* stub to make GEN_PUBLIC_API happy */
-static void destroy_zfftnd_mkl_caches()
-{
-}
-
extern void zfftnd_mkl(complex_double * inout, int rank,
int *dims, int direction, int howmany,
int normalize)
Modified: branches/refactor_fft/scipy/fftpack/src/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/zfft.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/zfft.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -9,11 +9,6 @@
/* The following macro convert private backend specific function to the public
* functions exported by the module */
#define GEN_PUBLIC_API(name) \
-extern "C" void destroy_zfft_cache(void)\
-{\
- destroy_z##name##_caches();\
-}\
-\
extern "C" void zfft(complex_double *inout, int n, \
int direction, int howmany, int normalize)\
{\
@@ -22,19 +17,6 @@
/* ************** Definition of backend specific functions ********* */
-/*
- * To add a backend :
- * - create a file zfft_name.c, where you define a function zfft_name where
- * name is the name of your backend. If you do not use the GEN_CACHE macro,
- * you will need to define a function void destroy_zname_caches(void),
- * which can do nothing
- * - in zfft.c, include the zfft_name.c file, and add the 3 following lines
- * just after it:
- * #ifndef WITH_DJBFFT
- * GEN_PUBLIC_API(name)
- * #endif
- */
-
#ifdef WITH_FFTW3
#include "fftw3/zfft.cxx"
#ifndef WITH_DJBFFT
@@ -63,11 +45,6 @@
*/
#ifdef WITH_DJBFFT
#include "djbfft/zfft.cxx"
- extern "C" void destroy_zfft_cache(void)
- {
- destroy_zdjbfft_caches();
- zfft_def_destroy_cache();
- }
extern "C" void zfft(complex_double *inout, int n,
int direction, int howmany, int normalize)
{
Modified: branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx 2008-05-11 12:50:00 UTC (rev 4270)
+++ branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx 2008-05-11 13:05:41 UTC (rev 4271)
@@ -8,11 +8,6 @@
/* The following macro convert private backend specific function to the public
* functions exported by the module */
#define GEN_PUBLIC_API(name) \
-extern "C" void destroy_zfftnd_cache(void)\
-{\
- destroy_zfftnd_##name##_caches();\
-}\
-\
extern "C" void zfftnd(complex_double * inout, int rank,\
int *dims, int direction, int howmany, int normalize)\
{\
@@ -20,26 +15,28 @@
}
#if defined(WITH_FFTW) || defined(WITH_MKL)
-static
-int equal_dims(int rank,int *dims1,int *dims2) {
- int i;
- for (i=0;i<rank;++i)
- if (dims1[i]!=dims2[i])
- return 0;
- return 1;
+static int equal_dims(int rank,int *dims1,int *dims2)
+{
+ int i;
+ for (i = 0; i < rank; ++i) {
+ if (dims1[i] != dims2[i]) {
+ return 0;
+ }
+ }
+ return 1;
}
#endif
#ifdef WITH_FFTW3
- #include "fftw3/zfftnd.cxx"
- GEN_PUBLIC_API(fftw3)
+ #include "fftw3/zfftnd.cxx"
+ GEN_PUBLIC_API(fftw3)
#elif defined WITH_FFTW
- #include "fftw/zfftnd.cxx"
- GEN_PUBLIC_API(fftw)
+ #include "fftw/zfftnd.cxx"
+ GEN_PUBLIC_API(fftw)
#elif defined WITH_MKL
- #include "mkl/zfftnd.cxx"
- GEN_PUBLIC_API(mkl)
+ #include "mkl/zfftnd.cxx"
+ GEN_PUBLIC_API(mkl)
#else /* Use fftpack by default */
- #include "fftpack/zfftnd.cxx"
- GEN_PUBLIC_API(fftpack)
+ #include "fftpack/zfftnd.cxx"
+ GEN_PUBLIC_API(fftpack)
#endif
More information about the Scipy-svn
mailing list