[Scipy-svn] r4241 - in branches/refactor_fft/scipy/fftpack: . src
scipy-svn at scipy.org
scipy-svn at scipy.org
Tue May 6 23:12:49 EDT 2008
Author: cdavid
Date: 2008-05-06 22:12:40 -0500 (Tue, 06 May 2008)
New Revision: 4241
Added:
branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx
Removed:
branches/refactor_fft/scipy/fftpack/src/zfftnd.c
Modified:
branches/refactor_fft/scipy/fftpack/SConstruct
branches/refactor_fft/scipy/fftpack/setup.py
Log:
Use C++ for zffnd API.
Modified: branches/refactor_fft/scipy/fftpack/SConstruct
===================================================================
--- branches/refactor_fft/scipy/fftpack/SConstruct 2008-05-07 01:20:23 UTC (rev 4240)
+++ branches/refactor_fft/scipy/fftpack/SConstruct 2008-05-07 03:12:40 UTC (rev 4241)
@@ -1,4 +1,4 @@
-# Last Change: Mon May 05 08:00 PM 2008 J
+# Last Change: Wed May 07 11:00 AM 2008 J
# vim:syntax=python
from os.path import join as pjoin
@@ -44,7 +44,7 @@
env.PrependUnique(LIBPATH = env['build_dir'])
# Build _fftpack
-src = ['src/zfft.cxx','src/drfft.c','src/zrfft.c', 'src/zfftnd.c', 'fftpack.pyf']
+src = ['src/zfft.cxx','src/drfft.cxx','src/zrfft.c', 'src/zfftnd.cxx', 'fftpack.pyf']
env.NumpyPythonExtension('_fftpack', src)
# Build convolve
Modified: branches/refactor_fft/scipy/fftpack/setup.py
===================================================================
--- branches/refactor_fft/scipy/fftpack/setup.py 2008-05-07 01:20:23 UTC (rev 4240)
+++ branches/refactor_fft/scipy/fftpack/setup.py 2008-05-07 03:12:40 UTC (rev 4241)
@@ -25,7 +25,7 @@
sources=[join('dfftpack','*.f')])
sources = ['fftpack.pyf','src/zfft.cxx','src/drfft.cxx','src/zrfft.c',
- 'src/zfftnd.c']
+ 'src/zfftnd.cxx']
config.add_extension('_fftpack',
sources=sources,
Deleted: branches/refactor_fft/scipy/fftpack/src/zfftnd.c
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/zfftnd.c 2008-05-07 01:20:23 UTC (rev 4240)
+++ branches/refactor_fft/scipy/fftpack/src/zfftnd.c 2008-05-07 03:12:40 UTC (rev 4241)
@@ -1,45 +0,0 @@
-/*
- Interface to various FFT libraries.
- Double complex FFT and IFFT, arbitrary dimensions.
- Author: Pearu Peterson, August 2002
- */
-#include "fftpack.h"
-
-/* The following macro convert private backend specific function to the public
- * functions exported by the module */
-#define GEN_PUBLIC_API(name) \
-void destroy_zfftnd_cache(void)\
-{\
- destroy_zfftnd_##name##_caches();\
-}\
-\
-void zfftnd(complex_double * inout, int rank,\
- int *dims, int direction, int howmany, int normalize)\
-{\
- zfftnd_##name(inout, rank, dims, direction, howmany, normalize);\
-}
-
-#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;
-}
-#endif
-
-#ifdef WITH_FFTW3
- #include "fftw3/zfftnd.c"
- GEN_PUBLIC_API(fftw3)
-#elif defined WITH_FFTW
- #include "fftw/zfftnd.c"
- GEN_PUBLIC_API(fftw)
-#elif defined WITH_MKL
- #include "mkl/zfftnd.c"
- GEN_PUBLIC_API(mkl)
-#else /* Use fftpack by default */
- #include "fftpack/zfftnd.c"
- GEN_PUBLIC_API(fftpack)
-#endif
Copied: branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx (from rev 4240, branches/refactor_fft/scipy/fftpack/src/zfftnd.c)
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/zfftnd.c 2008-05-07 01:20:23 UTC (rev 4240)
+++ branches/refactor_fft/scipy/fftpack/src/zfftnd.cxx 2008-05-07 03:12:40 UTC (rev 4241)
@@ -0,0 +1,45 @@
+/*
+ Interface to various FFT libraries.
+ Double complex FFT and IFFT, arbitrary dimensions.
+ Author: Pearu Peterson, August 2002
+ */
+#include "fftpack.h"
+
+/* 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)\
+{\
+ zfftnd_##name(inout, rank, dims, direction, howmany, normalize);\
+}
+
+#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;
+}
+#endif
+
+#ifdef WITH_FFTW3
+ #include "fftw3/zfftnd.c"
+ GEN_PUBLIC_API(fftw3)
+#elif defined WITH_FFTW
+ #include "fftw/zfftnd.c"
+ GEN_PUBLIC_API(fftw)
+#elif defined WITH_MKL
+ #include "mkl/zfftnd.c"
+ GEN_PUBLIC_API(mkl)
+#else /* Use fftpack by default */
+ #include "fftpack/zfftnd.c"
+ GEN_PUBLIC_API(fftpack)
+#endif
More information about the Scipy-svn
mailing list