Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:54

0001 /* fft/gsl_fft_complex.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef __GSL_FFT_COMPLEX_H__
0021 #define __GSL_FFT_COMPLEX_H__
0022 
0023 #include <stddef.h>
0024 
0025 #include <gsl/gsl_math.h>
0026 #include <gsl/gsl_complex.h>
0027 #include <gsl/gsl_fft.h>
0028 
0029 #undef __BEGIN_DECLS
0030 #undef __END_DECLS
0031 #ifdef __cplusplus
0032 # define __BEGIN_DECLS extern "C" {
0033 # define __END_DECLS }
0034 #else
0035 # define __BEGIN_DECLS /* empty */
0036 # define __END_DECLS /* empty */
0037 #endif
0038 
0039 __BEGIN_DECLS
0040 
0041 /*  Power of 2 routines  */
0042 
0043 
0044 int gsl_fft_complex_radix2_forward (gsl_complex_packed_array data,
0045                                     const size_t stride,
0046                                     const size_t n);
0047 
0048 int gsl_fft_complex_radix2_backward (gsl_complex_packed_array data,
0049                                      const size_t stride,
0050                                      const size_t n);
0051 
0052 int gsl_fft_complex_radix2_inverse (gsl_complex_packed_array data,
0053                                     const size_t stride,
0054                                     const size_t n);
0055 
0056 int gsl_fft_complex_radix2_transform (gsl_complex_packed_array data,
0057                                       const size_t stride,
0058                                       const size_t n,
0059                                       const gsl_fft_direction sign);
0060 
0061 int gsl_fft_complex_radix2_dif_forward (gsl_complex_packed_array data,
0062                                         const size_t stride,
0063                                         const size_t n);
0064 
0065 int gsl_fft_complex_radix2_dif_backward (gsl_complex_packed_array data,
0066                                          const size_t stride,
0067                                          const size_t n);
0068 
0069 int gsl_fft_complex_radix2_dif_inverse (gsl_complex_packed_array data,
0070                                         const size_t stride,
0071                                         const size_t n);
0072 
0073 int gsl_fft_complex_radix2_dif_transform (gsl_complex_packed_array data,
0074                                           const size_t stride,
0075                                           const size_t n,
0076                                           const gsl_fft_direction sign);
0077 
0078 /*  Mixed Radix general-N routines  */
0079 
0080 typedef struct
0081   {
0082     size_t n;
0083     size_t nf;
0084     size_t factor[64];
0085     gsl_complex *twiddle[64];
0086     gsl_complex *trig;
0087   }
0088 gsl_fft_complex_wavetable;
0089 
0090 typedef struct
0091 {
0092   size_t n;
0093   double *scratch;
0094 }
0095 gsl_fft_complex_workspace;
0096 
0097 
0098 gsl_fft_complex_wavetable *gsl_fft_complex_wavetable_alloc (size_t n);
0099 
0100 void gsl_fft_complex_wavetable_free (gsl_fft_complex_wavetable * wavetable);
0101 
0102 gsl_fft_complex_workspace *gsl_fft_complex_workspace_alloc (size_t n);
0103 
0104 void gsl_fft_complex_workspace_free (gsl_fft_complex_workspace * workspace);
0105 
0106 int gsl_fft_complex_memcpy (gsl_fft_complex_wavetable * dest,
0107                             gsl_fft_complex_wavetable * src);
0108 
0109 
0110 int gsl_fft_complex_forward (gsl_complex_packed_array data,
0111                              const size_t stride,
0112                              const size_t n,
0113                              const gsl_fft_complex_wavetable * wavetable,
0114                              gsl_fft_complex_workspace * work);
0115 
0116 int gsl_fft_complex_backward (gsl_complex_packed_array data,
0117                               const size_t stride,
0118                               const size_t n,
0119                               const gsl_fft_complex_wavetable * wavetable,
0120                               gsl_fft_complex_workspace * work);
0121 
0122 int gsl_fft_complex_inverse (gsl_complex_packed_array data,
0123                              const size_t stride,
0124                              const size_t n,
0125                              const gsl_fft_complex_wavetable * wavetable,
0126                              gsl_fft_complex_workspace * work);
0127 
0128 int gsl_fft_complex_transform (gsl_complex_packed_array data,
0129                                const size_t stride, const size_t n,
0130                                const gsl_fft_complex_wavetable * wavetable,
0131                                gsl_fft_complex_workspace * work,
0132                                const gsl_fft_direction sign);
0133 
0134 __END_DECLS
0135 
0136 #endif /* __GSL_FFT_COMPLEX_H__ */