!%f90 -*- f90 -*-
! Author: Pearu Peterson, August 2002

python module _fftpack
    interface

       subroutine zfft(x,n,direction,howmany,normalize)
         ! y = fft(x[,n,direction,normalize,overwrite_x])
         intent(c) zfft
         complex*16 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 zfft

       subroutine drfft(x,n,direction,howmany,normalize)
         ! y = drfft(x[,n,direction,normalize,overwrite_x])
         intent(c) drfft
         real*8 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 drfft

       subroutine zrfft(x,n,direction,howmany,normalize)
         ! y = zrfft(x[,n,direction,normalize,overwrite_x])
         intent(c) zrfft
         complex*16 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 zrfft

       subroutine zfftnd(x,r,s,direction,howmany,normalize,j)
         ! y = zfftnd(x[,s,direction,normalize,overwrite_x])
         intent(c) zfftnd
         complex*16 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_double*,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 zfftnd

       subroutine destroy_zfft_cache()
         intent(c) destroy_zfft_cache
       end subroutine destroy_zfft_cache

       subroutine destroy_zfftnd_cache()
         intent(c) destroy_zfftnd_cache
       end subroutine destroy_zfftnd_cache

       subroutine destroy_drfft_cache()
         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

       subroutine ddct1(x,n,howmany,normalize)
         ! y = ddct1(x[,n,normalize,overwrite_x])
         intent(c) ddct1
         real*8 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) :: normalize = 0
       end subroutine ddct1

       subroutine ddct2(x,n,howmany,normalize)
         ! y = ddct2(x[,n,normalize,overwrite_x])
         intent(c) ddct2
         real*8 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) :: normalize = 0
       end subroutine ddct2

       subroutine ddct3(x,n,howmany,normalize)
         ! y = ddct3(x[,n,normalize,overwrite_x])
         intent(c) ddct3
         real*8 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) :: normalize = 0
       end subroutine ddct3

       subroutine dct1(x,n,howmany,normalize)
         ! y = dct1(x[,n,normalize,overwrite_x])
         intent(c) dct1
         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) :: normalize = 0
       end subroutine dct1

       subroutine dct2(x,n,howmany,normalize)
         ! y = dct2(x[,n,normalize,overwrite_x])
         intent(c) dct2
         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) :: normalize = 0
       end subroutine dct2

       subroutine dct3(x,n,howmany,normalize)
         ! y = dct3(x[,n,normalize,overwrite_x])
         intent(c) dct3
         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) :: normalize = 0
       end subroutine dct3

       subroutine destroy_ddct2_cache()
         intent(c) destroy_ddct2_cache
       end subroutine destroy_ddct2_cache

       subroutine destroy_ddct1_cache()
         intent(c) destroy_ddct1_cache
       end subroutine destroy_ddct1_cache

       subroutine destroy_dct2_cache()
         intent(c) destroy_dct2_cache
       end subroutine destroy_dct2_cache

       subroutine destroy_dct1_cache()
         intent(c) destroy_dct1_cache
       end subroutine destroy_dct1_cache

       subroutine ddst1(x,n,howmany,normalize)
         ! y = ddst1(x[,n,normalize,overwrite_x])
         intent(c) ddst1
         real*8 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) :: normalize = 0
       end subroutine ddst1

       subroutine ddst2(x,n,howmany,normalize)
         ! y = ddst2(x[,n,normalize,overwrite_x])
         intent(c) ddst2
         real*8 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) :: normalize = 0
       end subroutine ddst2

       subroutine ddst3(x,n,howmany,normalize)
         ! y = ddst3(x[,n,normalize,overwrite_x])
         intent(c) ddst3
         real*8 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) :: normalize = 0
       end subroutine ddst3

       subroutine dst1(x,n,howmany,normalize)
         ! y = dst1(x[,n,normalize,overwrite_x])
         intent(c) dst1
         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) :: normalize = 0
       end subroutine dst1

       subroutine dst2(x,n,howmany,normalize)
         ! y = dst2(x[,n,normalize,overwrite_x])
         intent(c) dst2
         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) :: normalize = 0
       end subroutine dst2

       subroutine dst3(x,n,howmany,normalize)
         ! y = dst3(x[,n,normalize,overwrite_x])
         intent(c) dst3
         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) :: normalize = 0
       end subroutine dst3

       subroutine destroy_ddst2_cache()
         intent(c) destroy_ddst2_cache
       end subroutine destroy_ddst2_cache

       subroutine destroy_ddst1_cache()
         intent(c) destroy_ddst1_cache
       end subroutine destroy_ddst1_cache

       subroutine destroy_dst2_cache()
         intent(c) destroy_dst2_cache
       end subroutine destroy_dst2_cache

       subroutine destroy_dst1_cache()
         intent(c) destroy_dst1_cache
       end subroutine destroy_dst1_cache

    end interface 
end python module _fftpack

! See http://cens.ioc.ee/projects/f2py2e/
