[Scipy-svn] r4232 - branches/refactor_fft/scipy/fftpack/src/fftw3
scipy-svn at scipy.org
scipy-svn at scipy.org
Mon May 5 09:07:07 EDT 2008
Author: cdavid
Date: 2008-05-05 08:07:01 -0500 (Mon, 05 May 2008)
New Revision: 4232
Added:
branches/refactor_fft/scipy/fftpack/src/fftw3/common.h
Modified:
branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx
Log:
Put CacheId code in separate file for sharing (fftw3 backend only).
Added: branches/refactor_fft/scipy/fftpack/src/fftw3/common.h
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw3/common.h 2008-05-05 13:02:41 UTC (rev 4231)
+++ branches/refactor_fft/scipy/fftpack/src/fftw3/common.h 2008-05-05 13:07:01 UTC (rev 4232)
@@ -0,0 +1,35 @@
+#ifndef _SCIPYFFT_FFTW_COMMON_H_
+#define _SCIPYFFT_FFTW_COMMON_H_
+
+#include "cycliccache.h"
+
+namespace fft {
+
+class FFTW3CacheId : public CacheId {
+ public:
+ FFTW3CacheId(int n, int dir) :
+ CacheId(n),
+ m_dir(dir)
+ {
+ };
+
+ virtual bool operator==(const FFTW3CacheId& other) const
+ {
+ return is_equal(other);
+ }
+
+ virtual bool is_equal(const FFTW3CacheId& other) const
+ {
+ const CacheId *ot = &other;
+ const CacheId *th = this;
+
+ return m_dir == other.m_dir && th->is_equal(*ot);
+ }
+
+ public:
+ int m_dir;
+};
+
+}; // namespace fft
+
+#endif
Modified: branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx
===================================================================
--- branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx 2008-05-05 13:02:41 UTC (rev 4231)
+++ branches/refactor_fft/scipy/fftpack/src/fftw3/zfft.cxx 2008-05-05 13:07:01 UTC (rev 4232)
@@ -1,30 +1,9 @@
#include <new>
-#include "cycliccache.h"
+#include "common.h"
using namespace fft;
-class FFTW3CacheId : public CacheId {
- public:
- FFTW3CacheId(int n, int dir) : CacheId(n), m_dir(dir) {};
-
- virtual bool operator==(const FFTW3CacheId& other) const
- {
- return is_equal(other);
- }
-
- virtual bool is_equal(const FFTW3CacheId& other) const
- {
- const CacheId *ot = &other;
- const CacheId *th = this;
-
- return m_dir == other.m_dir && th->is_equal(*ot);
- }
-
- public:
- int m_dir;
-};
-
class FFTW3Cache : public Cache<FFTW3CacheId> {
public:
FFTW3Cache(const FFTW3CacheId& id);
More information about the Scipy-svn
mailing list