summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2015-11-13 13:49:16 +0100
committerErich Eckner <git@eckner.net>2015-11-13 13:49:16 +0100
commitf9ec77b7179b543ef51d457c8c0053b9a87cb87f (patch)
treea67876babc38999722e3f6518b7830bd743244ce
parent223abdad7e45ab18425100f6d603e24466940578 (diff)
downloadunits-f9ec77b7179b543ef51d457c8c0053b9a87cb87f.tar.xz
r2r-guru-interface neu in fftw.pas
-rw-r--r--fftw.pas20
1 files changed, 19 insertions, 1 deletions
diff --git a/fftw.pas b/fftw.pas
index 6d34a49..845c4e1 100644
--- a/fftw.pas
+++ b/fftw.pas
@@ -38,6 +38,11 @@ type complex_double=record
end;
Pcomplex_double=^complex_double;
+ fftw_iodim=record
+ n,ins,ous: integer;
+ end;
+ Pfftw_iodim=^fftw_iodim;
+
fftw_plan_double=type pointer;
fftw_sign=(fftw_forward=-1,fftw_backward=1);
@@ -51,7 +56,14 @@ type complex_double=record
fftw_patient, {generate highly optimized alg.}
fftw_estimate); {don't optimize, just use an alg.}
fftw_flagset=set of fftw_flag;
-
+
+ fftw_r2r_kind = (
+ FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
+ FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
+ FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
+ );
+ Pfftw_r2r_kind = ^fftw_r2r_kind;
+
{Complex to complex transformations.}
function fftw_plan_dft_1d(n:cardinal;i,o:Pcomplex_double;
@@ -109,6 +121,12 @@ function fftw_plan_dft(rank:cardinal;n:Pcardinal;i:Pcomplex_double;o:Pdouble;
flags:fftw_flagset):fftw_plan_double;
external fftwlib name 'fftw_plan_dft_c2r';
+{Real to real transformations.}
+function fftw_plan_guru_r2r(rank:cardinal;dims:Pfftw_iodim;howmany_rank:cardinal;
+ howmany_dims:pFftw_iodim;i,o:pDouble;
+ kind:Pfftw_r2r_kind;flags:fftw_flagset): fftw_plan_double;
+ external fftwlib name 'fftw_plan_guru_r2r';
+
procedure fftw_destroy_plan(plan:fftw_plan_double);
external fftwlib name 'fftw_destroy_plan';