diff options
Diffstat (limited to 'fftw.pas')
-rw-r--r-- | fftw.pas | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -41,7 +41,7 @@ type complex_double=record fftw_iodim=record n,ins,ous: integer; end; - Pfftw_iodim=^fftw_iodim; + pFft_iodim=^fftw_iodim; fftw_plan_double=type pointer; @@ -81,48 +81,48 @@ function fftw_plan_dft(rank:cardinal;n:Pcardinal;i,o:Pcomplex_double; external fftwlib name 'fftw_plan_dft'; {Real to complex transformations.} -function fftw_plan_dft_1d(n:cardinal;i:Pdouble;o:Pcomplex_double; +function fftw_plan_dft_1d(n:cardinal;i:pDouble;o:Pcomplex_double; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_r2c_1d'; -function fftw_plan_dft_2d(nx,ny:cardinal;i:Pdouble;o:Pcomplex_double; +function fftw_plan_dft_2d(nx,ny:cardinal;i:pDouble;o:Pcomplex_double; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_r2c_2d'; -function fftw_plan_dft_3d(nx,ny,nz:cardinal;i:Pdouble;o:Pcomplex_double; +function fftw_plan_dft_3d(nx,ny,nz:cardinal;i:pDouble;o:Pcomplex_double; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_r2c_3d'; -function fftw_plan_dft(rank:cardinal;n:Pcardinal;i:Pdouble;o:Pcomplex_double; +function fftw_plan_dft(rank:cardinal;n:Pcardinal;i:pDouble;o:Pcomplex_double; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_r2c'; function fftw_plan_many_dft_r2c(rank:cardinal;n:Pcardinal;howmany:cardinal; - i:Pdouble;inembed:Pcardinal;istride:cardinal; + i:pDouble;inembed:Pcardinal;istride:cardinal; idist:cardinal;o:Pcomplex_double;onembed:Pcardinal; ostride:cardinal;odist:cardinal; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_many_dft_r2c'; function fftw_plan_many_dft_c2r(rank:cardinal;n:Pcardinal;howmany:cardinal; i:Pcomplex_double;inembed:Pcardinal;istride:cardinal; - idist:cardinal;o:Pdouble;onembed:Pcardinal; + idist:cardinal;o:pDouble;onembed:Pcardinal; ostride:cardinal;odist:cardinal; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_many_dft_c2r'; {Complex to real transformations.} -function fftw_plan_dft_1d(n:cardinal;i:Pcomplex_double;o:Pdouble; +function fftw_plan_dft_1d(n:cardinal;i:Pcomplex_double;o:pDouble; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_c2r_1d'; -function fftw_plan_dft_2d(nx,ny:cardinal;i:Pcomplex_double;o:Pdouble; +function fftw_plan_dft_2d(nx,ny:cardinal;i:Pcomplex_double;o:pDouble; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_c2r_2d'; -function fftw_plan_dft_3d(nx,ny,nz:cardinal;i:Pcomplex_double;o:Pdouble; +function fftw_plan_dft_3d(nx,ny,nz:cardinal;i:Pcomplex_double;o:pDouble; flags:fftw_flagset):fftw_plan_double; external fftwlib name 'fftw_plan_dft_c2r_3d'; -function fftw_plan_dft(rank:cardinal;n:Pcardinal;i:Pcomplex_double;o:Pdouble; +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; +function fftw_plan_guru_r2r(rank:cardinal;dims:pFft_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'; @@ -140,7 +140,7 @@ function fftw_import_wisdom_from_filename(filename: pChar): cardinal; external fftwlib name 'fftw_import_wisdom_from_filename'; {$calling register} {Back to normal!} -procedure fftw_getmem(var p:pointer;size:sizeint); +procedure fftw_getmem(var p:pointer;size:sizeInt); procedure fftw_freemem(p:pointer);inline; {*****************************************************************************} @@ -162,22 +162,22 @@ procedure fftw_freemem(p:pointer);inline; {$DEFINE align:=16} {$ENDIF} -procedure fftw_getmem(var p:pointer;size:sizeint); +procedure fftw_getmem(var p:pointer;size:sizeInt); {$IFDEF align} var originalptr:pointer; begin { We allocate additional "align-1" bytes to be able to align. - And we allocate additional "SizeOf(Pointer)" to always have space to store + And we allocate additional "sizeOf(pointer)" to always have space to store the value of the original pointer. } - getmem(originalptr,size + align-1 + SizeOf(Pointer)); - ptruint(p):=(ptruint(originalptr) + SizeOf(Pointer)); - ptruint(p):=(ptruint(p)+align-1) and not (align-1); - PPointer(ptruint(p) - SizeOf(Pointer))^:=originalptr; + getMem(originalptr,size + align-1 + sizeOf(pointer)); + ptrUInt(p):=(ptrUInt(originalptr) + sizeOf(pointer)); + ptrUInt(p):=(ptrUInt(p)+align-1) and not (align-1); + pPointer(ptrUInt(p) - sizeOf(pointer))^:=originalptr; {$ELSE} begin - getmem(p,size); + getMem(p,size); {$ENDIF} end; @@ -185,9 +185,9 @@ procedure fftw_freemem(p:pointer);inline; begin {$IFDEF align} - freemem(PPointer(ptruint(p) - SizeOf(Pointer))^); + freeMem(pPointer(ptrUInt(p) - sizeOf(pointer))^); {$ELSE} - freemem(p); + freeMem(p); {$ENDIF} end; |