[Scipy-svn] r5350 - trunk/scipy/fftpack
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jan 7 09:46:56 EST 2009
Author: cdavid
Date: 2009-01-07 08:46:46 -0600 (Wed, 07 Jan 2009)
New Revision: 5350
Modified:
trunk/scipy/fftpack/fftpack.pyf
Log:
Add single prec implementation to f2py wrapper.
Modified: trunk/scipy/fftpack/fftpack.pyf
===================================================================
--- trunk/scipy/fftpack/fftpack.pyf 2009-01-07 14:46:12 UTC (rev 5349)
+++ trunk/scipy/fftpack/fftpack.pyf 2009-01-07 14:46:46 UTC (rev 5350)
@@ -83,6 +83,86 @@
intent(c) destroy_drfft_cache
end subroutine destroy_drfft_cache
+ /* Single precision version */
+ subroutine cfft(x,n,direction,howmany,normalize)
+ ! y = fft(x[,n,direction,normalize,overwrite_x])
+ intent(c) cfft
+ complex*8 intent(c,in,out,copy,out=y) :: x(*)
+ integer optional,depend(x),intent(c,in) :: n=size(x)
+ check(n>0) n
+ integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
+ check(n*howmany==size(x)) howmany
+ integer optional,intent(c,in) :: direction = 1
+ integer optional,intent(c,in),depend(direction) &
+ :: normalize = (direction<0)
+ end subroutine cfft
+
+ subroutine rfft(x,n,direction,howmany,normalize)
+ ! y = rfft(x[,n,direction,normalize,overwrite_x])
+ intent(c) rfft
+ real*4 intent(c,in,out,copy,out=y) :: x(*)
+ integer optional,depend(x),intent(c,in) :: n=size(x)
+ check(n>0&&n<=size(x)) n
+ integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
+ check(n*howmany==size(x)) howmany
+ integer optional,intent(c,in) :: direction = 1
+ integer optional,intent(c,in),depend(direction) &
+ :: normalize = (direction<0)
+ end subroutine rfft
+
+! subroutine crfft(x,n,direction,howmany,normalize)
+! ! y = crfft(x[,n,direction,normalize,overwrite_x])
+! intent(c) crfft
+! complex*8 intent(c,in,out,overwrite,out=y) :: x(*)
+! integer optional,depend(x),intent(c,in) :: n=size(x)
+! check(n>0&&n<=size(x)) n
+! integer depend(x,n),intent(c,hide) :: howmany = size(x)/n
+! check(n*howmany==size(x)) howmany
+! integer optional,intent(c,in) :: direction = 1
+! integer optional,intent(c,in),depend(direction) &
+! :: normalize = (direction<0)
+! end subroutine crfft
+!
+ subroutine cfftnd(x,r,s,direction,howmany,normalize,j)
+ ! y = cfftnd(x[,s,direction,normalize,overwrite_x])
+ intent(c) cfftnd
+ complex*8 intent(c,in,out,copy,out=y) :: x(*)
+ integer intent(c,hide),depend(x) :: r=old_rank(x)
+ integer intent(c,hide) :: j=0
+ integer optional,depend(r),dimension(r),intent(c,in) &
+ :: s=old_shape(x,j++)
+ check(r>=len(s)) s
+ integer intent(c,hide) :: howmany = 1
+ integer optional,intent(c,in) :: direction = 1
+ integer optional,intent(c,in),depend(direction) :: &
+ normalize = (direction<0)
+ callprotoargument complex_float*,int,int*,int,int,int
+ callstatement {&
+ int i,sz=1,xsz=size(x); &
+ for (i=0;i<r;++i) sz *= s[i]; &
+ howmany = xsz/sz; &
+ if (sz*howmany==xsz) &
+ (*f2py_func)(x,r,s,direction,howmany,normalize); &
+ else {&
+ f2py_success = 0; &
+ PyErr_SetString(_fftpack_error, &
+ "inconsistency in x.shape and s argument"); &
+ } &
+ }
+ end subroutine cfftnd
+
+ subroutine destroy_cfft_cache()
+ intent(c) destroy_cfft_cache
+ end subroutine destroy_cfft_cache
+
+ subroutine destroy_cfftnd_cache()
+ intent(c) destroy_cfftnd_cache
+ end subroutine destroy_cfftnd_cache
+
+ subroutine destroy_rfft_cache()
+ intent(c) destroy_rfft_cache
+ end subroutine destroy_rfft_cache
+
end interface
end python module _fftpack
More information about the Scipy-svn
mailing list