summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/fftw++.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
committerKarl Berry <karl@freefriends.org>2009-07-08 01:04:31 +0000
commit17ee31b51081b8281b652fa06b997918003f7772 (patch)
treec5c1420540fe9a31454c1450ec5d96c096f91a9b /Build/source/utils/asymptote/fftw++.h
parentbf914f81a2ff8552e1438251f4b6b56f9acf0b90 (diff)
asymptote 1.80
git-svn-id: svn://tug.org/texlive/trunk@14179 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/fftw++.h')
-rw-r--r--Build/source/utils/asymptote/fftw++.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/Build/source/utils/asymptote/fftw++.h b/Build/source/utils/asymptote/fftw++.h
index e3cb3d2b2f2..62f8281e278 100644
--- a/Build/source/utils/asymptote/fftw++.h
+++ b/Build/source/utils/asymptote/fftw++.h
@@ -18,7 +18,7 @@
#ifndef __fftwpp_h__
#define __fftwpp_h__ 1
-#define __FFTWPP_H_VERSION__ 1.03
+#define __FFTWPP_H_VERSION__ 1.04
#include <cstdlib>
#include <fstream>
@@ -78,13 +78,13 @@ inline void FFTWdelete(T *p)
fftw_free(alloc);
}
-inline void fftw_export_wisdom(void (*emitter)(char c, std::ofstream& s),
+inline void fftwpp_export_wisdom(void (*emitter)(char c, std::ofstream& s),
std::ofstream& s)
{
fftw_export_wisdom((void (*) (char, void *)) emitter,(void *) &s);
}
-inline int fftw_import_wisdom(int (*g)(std::ifstream& s), std::ifstream &s)
+inline int fftwpp_import_wisdom(int (*g)(std::ifstream& s), std::ifstream &s)
{
return fftw_import_wisdom((int (*) (void *)) g,(void *) &s);
}
@@ -101,8 +101,8 @@ protected:
double norm;
bool shift;
- bool inplace;
fftw_plan plan;
+ bool inplace;
static unsigned int effort;
static bool Wise;
@@ -154,9 +154,10 @@ protected:
public:
fftw(unsigned int size, int sign, unsigned int n=0) :
- size(size), sign(sign), norm(1.0/(n ? n : size)), shift(false) {}
+ size(size), sign(sign), norm(1.0/(n ? n : size)), shift(false), plan(NULL)
+ {}
- virtual ~fftw() {}
+ virtual ~fftw() {if(plan) fftw_destroy_plan(plan);}
virtual fftw_plan Plan(Complex *in, Complex *out)=0;
@@ -193,14 +194,14 @@ public:
void LoadWisdom() {
ifWisdom.open(WisdomName);
- fftw_import_wisdom(GetWisdom,ifWisdom);
+ fftwpp_import_wisdom(GetWisdom,ifWisdom);
ifWisdom.close();
Wise=true;
}
void SaveWisdom() {
ofWisdom.open(WisdomName);
- fftw_export_wisdom(PutWisdom,ofWisdom);
+ fftwpp_export_wisdom(PutWisdom,ofWisdom);
ofWisdom.close();
}