;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "gsl/gsl-config")



#? *** fft

;; dummy function that adds GSL C header files in C file
(eval `(de dummy_fft () ,gsl-cpheader-cmd ()))

#? * (dummy_fft)
#? * (gsl_dft_complex_float_forward <data> <stride> <n> <result>)
#? * (gsl_dft_complex_float_backward <data> <stride> <n> <result>)
#? * (gsl_dft_complex_float_inverse <data> <stride> <n> <result>)
#? * (gsl_dft_complex_float_transform <data> <stride> <n> <result> <sign>)
#? * (gsl_dft_complex_forward <data> <stride> <n> <result>)
#? * (gsl_dft_complex_backward <data> <stride> <n> <result>)
#? * (gsl_dft_complex_inverse <data> <stride> <n> <result>)
#? * (gsl_dft_complex_transform <data> <stride> <n> <result> <sign>)
#? * (gsl_fft_complex_float_radix2_forward <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_backward <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_inverse <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_transform <data> <stride> <n> <sign>)
#? * (gsl_fft_complex_float_radix2_dif_forward <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_dif_backward <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_dif_inverse <data> <stride> <n>)
#? * (gsl_fft_complex_float_radix2_dif_transform <data> <stride> <n> <sign>)
#? * (gsl_fft_complex_float_bitreverse_order <data> <stride> <n> <n_bits>)
#? * (gsl_fft_complex_wavetable_float_alloc <n>)
#? * (gsl_fft_complex_wavetable_float_free <wavetable>)
#? * (gsl_fft_complex_workspace_float_alloc <n>)
#? * (gsl_fft_complex_workspace_float_free <workspace>)
#? * (gsl_fft_complex_float_memcpy <dest> <src>)
#? * (gsl_fft_complex_float_forward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_float_backward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_float_inverse <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_float_transform <data> <stride> <n> <wavetable> <work> <sign>)
#? * (gsl_fft_complex_radix2_forward <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_backward <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_inverse <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_transform <data> <stride> <n> <sign>)
#? * (gsl_fft_complex_radix2_dif_forward <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_dif_backward <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_dif_inverse <data> <stride> <n>)
#? * (gsl_fft_complex_radix2_dif_transform <data> <stride> <n> <sign>)
#? * (gsl_fft_complex_bitreverse_order <data> <stride> <n> <n_bits>)
#? * (gsl_fft_complex_wavetable_alloc <n>)
#? * (gsl_fft_complex_wavetable_free <wavetable>)
#? * (gsl_fft_complex_workspace_alloc <n>)
#? * (gsl_fft_complex_workspace_free <workspace>)
#? * (gsl_fft_complex_memcpy <dest> <src>)
#? * (gsl_fft_complex_forward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_backward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_inverse <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_complex_transform <data> <stride> <n> <wavetable> <work> <sign>)
#? * (gsl_fft_halfcomplex_float_radix2_backward <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_float_radix2_inverse <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_float_radix2_transform <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_wavetable_float_alloc <n>)
#? * (gsl_fft_halfcomplex_wavetable_float_free <wavetable>)
#? * (gsl_fft_halfcomplex_float_backward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_float_inverse <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_float_transform <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_float_unpack <halfcomplex_coefficient> <complex_coefficient> <stride> <n>)
#? * (gsl_fft_halfcomplex_float_radix2_unpack <halfcomplex_coefficient> <complex_coefficient> <stride> <n>)
#? * (gsl_fft_halfcomplex_radix2_backward <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_radix2_inverse <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_radix2_transform <data> <stride> <n>)
#? * (gsl_fft_halfcomplex_wavetable_alloc <n>)
#? * (gsl_fft_halfcomplex_wavetable_free <wavetable>)
#? * (gsl_fft_halfcomplex_backward <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_inverse <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_transform <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_halfcomplex_unpack <halfcomplex_coefficient> <complex_coefficient> <stride> <n>)
#? * (gsl_fft_halfcomplex_radix2_unpack <halfcomplex_coefficient> <complex_coefficient> <stride> <n>)
#? * (gsl_fft_real_radix2_transform <data> <stride> <n>)
#? * (gsl_fft_real_wavetable_alloc <n>)
#? * (gsl_fft_real_wavetable_free <wavetable>)
#? * (gsl_fft_real_workspace_alloc <n>)
#? * (gsl_fft_real_workspace_free <workspace>)
#? * (gsl_fft_real_transform <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_real_unpack <real_coefficient> <complex_coefficient> <stride> <n>)
#? * (gsl_fft_real_float_radix2_transform <data> <stride> <n>)
#? * (gsl_fft_real_wavetable_float_alloc <n>)
#? * (gsl_fft_real_wavetable_float_free <wavetable>)
#? * (gsl_fft_real_workspace_float_alloc <n>)
#? * (gsl_fft_real_workspace_float_free <workspace>)
#? * (gsl_fft_real_float_transform <data> <stride> <n> <wavetable> <work>)
#? * (gsl_fft_real_float_unpack <real_float_coefficient> <complex_coefficient> <stride> <n>)

;; ********************************************************


;;;;*************************************************************************************
;;;;          gsl_dft_complex_float 

(de gsl_dft_complex_float_forward (    data  stride  n  result )
    ((-gptr- "const float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "float *") result) 
    (int #{ gsl_dft_complex_float_forward (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_float_backward (    data  stride  n  result )
    ((-gptr- "const float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "float *") result) 
    (int #{ gsl_dft_complex_float_backward (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_float_inverse (    data  stride  n  result )
    ((-gptr- "const float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "float *") result) 
    (int #{ gsl_dft_complex_float_inverse (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_float_transform (    data  stride  n  result  sign )
    ((-gptr- "const float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "float *") result) 
    ((-int-) sign)                    ;; gsl_fft_direction (-1, +1) -> int
    (int #{ gsl_dft_complex_float_transform (  $data ,$stride ,$n ,$result ,$sign) #} )
)


;;;;***************************************************************************************
;;;;        gsl_dft_complex


(de gsl_dft_complex_forward (    data  stride  n  result )
    ((-gptr- "const double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "double *") result) 
    (int #{ gsl_dft_complex_forward (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_backward (    data  stride  n  result )
    ((-gptr- "const double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "double *") result) 
    (int #{ gsl_dft_complex_backward (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_inverse (    data  stride  n  result )
    ((-gptr- "const double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "double *") result) 
    (int #{ gsl_dft_complex_inverse (  $data ,$stride ,$n ,$result) #} )
)


(de gsl_dft_complex_transform (    data  stride  n  result  sign )
    ((-gptr- "const double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "double *") result) 
    ((-int-) sign)                   ;; gsl_fft_direction -> int
    (int #{ gsl_dft_complex_transform (  $data ,$stride ,$n ,$result ,$sign) #} )
)


;;;;***************************************************************************************
;;;;           gsl_fft_complex_float 


(de gsl_fft_complex_float_radix2_forward (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_forward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_backward (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_backward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_inverse (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_inverse (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_transform (    data  stride  n  sign )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) sign)                   ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_float_radix2_transform (  $data ,$stride ,$n ,$sign) #} )
)


(de gsl_fft_complex_float_radix2_dif_forward (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_dif_forward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_dif_backward (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_dif_backward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_dif_inverse (    data  stride  n )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_radix2_dif_inverse (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_float_radix2_dif_transform (    data  stride  n  sign )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) sign)                   ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_float_radix2_dif_transform (  $data ,$stride ,$n ,$sign) #} )
)


(de gsl_fft_complex_float_bitreverse_order (    data  stride  n  n_bits )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) n_bits)                     ;; size_t -> int
    (int #{ gsl_fft_complex_float_bitreverse_order (  $data ,$stride ,$n ,$n_bits) #} )
)




(de gsl_fft_complex_wavetable_float_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_complex_wavetable_float_alloc (  $n) #} )          ;; gsl_fft_complex_wavetable_float * -> gptr
)


(de gsl_fft_complex_wavetable_float_free (    wavetable )
    ((-gptr- "gsl_fft_complex_wavetable_float *") wavetable) 
    #{ gsl_fft_complex_wavetable_float_free (  $wavetable) #} 
    ()
)


(de gsl_fft_complex_workspace_float_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{  gsl_fft_complex_workspace_float_alloc (  $n) #} )    ;; gsl_fft_complex_workspace_float * -> gptr
)


(de gsl_fft_complex_workspace_float_free (    workspace )
    ((-gptr- "gsl_fft_complex_workspace_float *") workspace) 
    #{ gsl_fft_complex_workspace_float_free (  $workspace) #} 
    ()
)



(de gsl_fft_complex_float_memcpy (    dest  src )
    ((-gptr- "gsl_fft_complex_wavetable_float *") dest) 
    ((-gptr- "gsl_fft_complex_wavetable_float *") src) 
    (int #{ gsl_fft_complex_float_memcpy (  $dest ,$src) #} )
)



(de gsl_fft_complex_float_forward (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace_float *") work) 
    (int #{ gsl_fft_complex_float_forward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_float_backward (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace_float *") work) 
    (int #{ gsl_fft_complex_float_backward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_float_inverse (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace_float *") work) 
    (int #{ gsl_fft_complex_float_inverse (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_float_transform (    data  stride  n  wavetable  work  sign )
    ((-gptr- "float *") data)              
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace_float *") work) 
    ((-int-) sign)                   ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_float_transform (  $data ,$stride ,$n ,$wavetable ,$work ,$sign) #} )
)

;;;;**************************************************************************************************
;;;;           gsl_fft_complex


(de gsl_fft_complex_radix2_forward (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_forward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_backward (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_backward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_inverse (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_inverse (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_transform (    data  stride  n  sign )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) sign)                     ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_radix2_transform (  $data ,$stride ,$n ,$sign) #} )
)


(de gsl_fft_complex_radix2_dif_forward (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_dif_forward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_dif_backward (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_dif_backward (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_dif_inverse (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_complex_radix2_dif_inverse (  $data ,$stride ,$n) #} )
)


(de gsl_fft_complex_radix2_dif_transform (    data  stride  n  sign )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) sign)                     ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_radix2_dif_transform (  $data ,$stride ,$n ,$sign) #} )
)


(de gsl_fft_complex_bitreverse_order (    data  stride  n  n_bits )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-int-) n_bits)                     ;; size_t -> int
    (int #{ gsl_fft_complex_bitreverse_order (  $data ,$stride ,$n ,$n_bits) #} )
)




(de gsl_fft_complex_wavetable_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_complex_wavetable_alloc (  $n) #} )          ;; gsl_fft_complex_wavetable * -> gptr
)


(de gsl_fft_complex_wavetable_free (    wavetable )
    ((-gptr- "gsl_fft_complex_wavetable *") wavetable) 
    #{ gsl_fft_complex_wavetable_free (  $wavetable) #} 
    ()
)


(de gsl_fft_complex_workspace_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_complex_workspace_alloc (  $n) #} )          ;; gsl_fft_complex_workspace * -> gptr
)


(de gsl_fft_complex_workspace_free (    workspace )
    ((-gptr- "gsl_fft_complex_workspace *") workspace) 
    #{ gsl_fft_complex_workspace_free (  $workspace) #} 
    ()
)


(de gsl_fft_complex_memcpy (    dest  src )
    ((-gptr- "gsl_fft_complex_wavetable *") dest) 
    ((-gptr- "gsl_fft_complex_wavetable *") src) 
    (int #{ gsl_fft_complex_memcpy (  $dest ,$src) #} )
)



(de gsl_fft_complex_forward (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace *") work) 
    (int #{ gsl_fft_complex_forward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_backward (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace *") work) 
    (int #{ gsl_fft_complex_backward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_inverse (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace *") work) 
    (int #{ gsl_fft_complex_inverse (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_complex_transform (    data  stride  n  wavetable  work  sign )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_complex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_complex_workspace *") work) 
    ((-int-) sign)                     ;; gsl_fft_direction (enum) -> int
    (int #{ gsl_fft_complex_transform (  $data ,$stride ,$n ,$wavetable ,$work ,$sign) #} )
)

;;;;****************************************************************************************************
;;;;               gsl_fft_halfcomplex_float


(de gsl_fft_halfcomplex_float_radix2_backward (    data  stride  n )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_float_radix2_backward (  $data ,$stride ,$n) #} )
)

(de gsl_fft_halfcomplex_float_radix2_inverse (    data  stride  n )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_float_radix2_inverse (  $data ,$stride ,$n) #} )
)

(de gsl_fft_halfcomplex_float_radix2_transform (    data  stride  n )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_float_radix2_transform (  $data ,$stride ,$n) #} )
)



(de gsl_fft_halfcomplex_wavetable_float_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_halfcomplex_wavetable_float_alloc (  $n) #} )          ;; gsl_fft_halfcomplex_wavetable_float * -> gptr
)


(de gsl_fft_halfcomplex_wavetable_float_free (    wavetable )
    ((-gptr- "gsl_fft_halfcomplex_wavetable_float *") wavetable) 
    #{ gsl_fft_halfcomplex_wavetable_float_free (  $wavetable) #} 
    ()
)


(de gsl_fft_halfcomplex_float_backward (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace_float *") work) 
    (int #{ gsl_fft_halfcomplex_float_backward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_float_inverse (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace_float *") work) 
    (int #{ gsl_fft_halfcomplex_float_inverse (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_float_transform (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace_float *") work) 
    (int #{ gsl_fft_halfcomplex_float_transform (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_float_unpack (    halfcomplex_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const float *") halfcomplex_coefficient) 
    ((-gptr- "float *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_float_unpack (  $halfcomplex_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)


(de gsl_fft_halfcomplex_float_radix2_unpack (    halfcomplex_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const float *") halfcomplex_coefficient) 
    ((-gptr- "float *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_float_radix2_unpack (  $halfcomplex_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)

;;;;***********************************************************************************************************************
;;;;              gsl_fft_halfcomplex



(de gsl_fft_halfcomplex_radix2_backward (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_radix2_backward (  $data ,$stride ,$n) #} )
)

(de gsl_fft_halfcomplex_radix2_inverse (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_radix2_inverse (  $data ,$stride ,$n) #} )
)

(de gsl_fft_halfcomplex_radix2_transform (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_radix2_transform (  $data ,$stride ,$n) #} )
)


(de gsl_fft_halfcomplex_wavetable_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_halfcomplex_wavetable_alloc (  $n) #} )          ;; gsl_fft_halfcomplex_wavetable * -> gptr
)


(de gsl_fft_halfcomplex_wavetable_free (    wavetable )
    ((-gptr- "gsl_fft_halfcomplex_wavetable *") wavetable) 
    #{ gsl_fft_halfcomplex_wavetable_free (  $wavetable) #} 
    ()
)



(de gsl_fft_halfcomplex_backward (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace *") work) 
    (int #{ gsl_fft_halfcomplex_backward (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_inverse (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace *") work) 
    (int #{ gsl_fft_halfcomplex_inverse (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_transform (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_halfcomplex_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace *") work) 
    (int #{ gsl_fft_halfcomplex_transform (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)


(de gsl_fft_halfcomplex_unpack (    halfcomplex_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const double *") halfcomplex_coefficient) 
    ((-gptr- "double *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_unpack (  $halfcomplex_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)


(de gsl_fft_halfcomplex_radix2_unpack (    halfcomplex_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const double *") halfcomplex_coefficient) 
    ((-gptr- "double *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_halfcomplex_radix2_unpack (  $halfcomplex_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)


;;;;*****************************************************************************************************************
;;;;      gsl_fft_real

(de gsl_fft_real_radix2_transform (    data  stride  n )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_real_radix2_transform (  $data ,$stride ,$n)  #} )
)


(de gsl_fft_real_wavetable_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_real_wavetable_alloc (  $n) #} )          ;; gsl_fft_real_wavetable * -> gptr
)


(de gsl_fft_real_wavetable_free (    wavetable )
    ((-gptr- "gsl_fft_real_wavetable *") wavetable) 
    #{ gsl_fft_real_wavetable_free (  $wavetable) #} 
    ()
)


(de gsl_fft_real_workspace_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_real_workspace_alloc (  $n) #} )          ;; gsl_fft_real_workspace * -> gptr
)


(de gsl_fft_real_workspace_free (    workspace )
    ((-gptr- "gsl_fft_real_workspace *") workspace) 
    #{ gsl_fft_real_workspace_free (  $workspace) #} 
    ()
)



(de gsl_fft_real_transform (    data  stride  n  wavetable  work )
    ((-gptr- "double *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_real_wavetable *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace *") work) 
    (int #{ gsl_fft_real_transform (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)



(de gsl_fft_real_unpack (    real_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const double *") real_coefficient) 
    ((-gptr- "double *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_real_unpack (  $real_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)


;;;;*****************************************************************************************
;;;;         gsl_fft_real_float

(de gsl_fft_real_float_radix2_transform (    data  stride  n )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_real_float_radix2_transform (  $data ,$stride ,$n)  #} )
)


(de gsl_fft_real_wavetable_float_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_real_wavetable_float_alloc (  $n) #} )          ;; gsl_fft_real_wavetable_float * -> gptr
)


(de gsl_fft_real_wavetable_float_free (    wavetable )
    ((-gptr- "gsl_fft_real_wavetable_float *") wavetable) 
    #{ gsl_fft_real_wavetable_float_free (  $wavetable) #} 
    ()
)


(de gsl_fft_real_workspace_float_alloc (    n )
    ((-int-) n)                     ;; size_t -> int
    (gptr #{ gsl_fft_real_workspace_float_alloc (  $n) #} )          ;; gsl_fft_real_workspace_float * -> gptr
)


(de gsl_fft_real_workspace_float_free (    workspace )
    ((-gptr- "gsl_fft_real_workspace_float *") workspace) 
    #{ gsl_fft_real_workspace_float_free (  $workspace) #} 
    ()
)


(de gsl_fft_real_float_transform (    data  stride  n  wavetable  work )
    ((-gptr- "float *") data) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "const gsl_fft_real_wavetable_float *") wavetable) 
    ((-gptr- "gsl_fft_real_workspace_float *") work) 
    (int #{ gsl_fft_real_float_transform (  $data ,$stride ,$n ,$wavetable ,$work) #} )
)



(de gsl_fft_real_float_unpack (    real_float_coefficient  complex_coefficient  stride  n )
    ((-gptr- "const float *") real_float_coefficient) 
    ((-gptr- "float *") complex_coefficient) 
    ((-int-) stride)                     ;; size_t -> int
    ((-int-) n)                     ;; size_t -> int
    (int #{ gsl_fft_real_float_unpack (  $real_float_coefficient ,$complex_coefficient ,$stride ,$n) #} )
)




;; ********************************************************

(dhc-make ()
  dummy_fft
  gsl_dft_complex_float_forward
  gsl_dft_complex_float_backward
  gsl_dft_complex_float_inverse
  gsl_dft_complex_float_transform
  gsl_dft_complex_forward
  gsl_dft_complex_backward
  gsl_dft_complex_inverse
  gsl_dft_complex_transform
  gsl_fft_complex_float_radix2_forward
  gsl_fft_complex_float_radix2_backward
  gsl_fft_complex_float_radix2_inverse
  gsl_fft_complex_float_radix2_transform
  gsl_fft_complex_float_radix2_dif_forward
  gsl_fft_complex_float_radix2_dif_backward
  gsl_fft_complex_float_radix2_dif_inverse
  gsl_fft_complex_float_radix2_dif_transform
;;  gsl_fft_complex_float_bitreverse_order
  gsl_fft_complex_wavetable_float_alloc
  gsl_fft_complex_wavetable_float_free
  gsl_fft_complex_workspace_float_alloc
  gsl_fft_complex_workspace_float_free
  gsl_fft_complex_float_memcpy
  gsl_fft_complex_float_forward
  gsl_fft_complex_float_backward
  gsl_fft_complex_float_inverse
  gsl_fft_complex_float_transform
  gsl_fft_complex_radix2_forward
  gsl_fft_complex_radix2_backward
  gsl_fft_complex_radix2_inverse
  gsl_fft_complex_radix2_transform
  gsl_fft_complex_radix2_dif_forward
  gsl_fft_complex_radix2_dif_backward
  gsl_fft_complex_radix2_dif_inverse
  gsl_fft_complex_radix2_dif_transform
;;  gsl_fft_complex_bitreverse_order
  gsl_fft_complex_wavetable_alloc
  gsl_fft_complex_wavetable_free
  gsl_fft_complex_workspace_alloc
  gsl_fft_complex_workspace_free
  gsl_fft_complex_memcpy
  gsl_fft_complex_forward
  gsl_fft_complex_backward
  gsl_fft_complex_inverse
  gsl_fft_complex_transform
  gsl_fft_halfcomplex_float_radix2_backward
  gsl_fft_halfcomplex_float_radix2_inverse
  gsl_fft_halfcomplex_float_radix2_transform
  gsl_fft_halfcomplex_wavetable_float_alloc
  gsl_fft_halfcomplex_wavetable_float_free
  gsl_fft_halfcomplex_float_backward
  gsl_fft_halfcomplex_float_inverse
  gsl_fft_halfcomplex_float_transform
  gsl_fft_halfcomplex_float_unpack
  gsl_fft_halfcomplex_float_radix2_unpack
  gsl_fft_halfcomplex_radix2_backward
  gsl_fft_halfcomplex_radix2_inverse
  gsl_fft_halfcomplex_radix2_transform
  gsl_fft_halfcomplex_wavetable_alloc
  gsl_fft_halfcomplex_wavetable_free
  gsl_fft_halfcomplex_backward
  gsl_fft_halfcomplex_inverse
  gsl_fft_halfcomplex_transform
  gsl_fft_halfcomplex_unpack
  gsl_fft_halfcomplex_radix2_unpack
  gsl_fft_real_radix2_transform
  gsl_fft_real_wavetable_alloc
  gsl_fft_real_wavetable_free
  gsl_fft_real_workspace_alloc
  gsl_fft_real_workspace_free
  gsl_fft_real_transform
  gsl_fft_real_unpack
  gsl_fft_real_float_radix2_transform
  gsl_fft_real_wavetable_float_alloc
  gsl_fft_real_wavetable_float_free
  gsl_fft_real_workspace_float_alloc
  gsl_fft_real_workspace_float_free
  gsl_fft_real_float_transform
  gsl_fft_real_float_unpack
)
