FFT typemap and test
[Math-GSL.git] / FFT.i
blob5ffbc0c354fda97f37ed12e6f612cf2f5c1cce27
1 %module "Math::GSL::FFT"
2 %include "typemaps.i"
3 %include "gsl_typemaps.i"
6 %typemap(argout) (double data[], const size_t stride, const size_t n) {
7 int i=0;
8 AV* tempav = newAV();
10 while( i < $3 ) {
11 av_push(tempav, newSVnv((double) $1[i]));
12 i++;
15 $result = sv_2mortal( newRV_noinc( (SV*) tempav) );
16 argvi++;
21 #include "gsl/gsl_fft.h"
22 #include "gsl/gsl_fft_complex.h"
23 #include "gsl/gsl_fft_halfcomplex.h"
24 #include "gsl/gsl_fft_real.h"
25 #include "gsl/gsl_complex.h"
28 %include "gsl/gsl_complex.h"
29 %include "gsl/gsl_fft.h"
30 %include "gsl/gsl_fft_complex.h"
31 %include "gsl/gsl_fft_halfcomplex.h"
32 %include "gsl/gsl_fft_real.h"
34 %perlcode %{
35 @EXPORT_complex = qw/
36 gsl_fft_complex_radix2_forward
37 gsl_fft_complex_radix2_backward
38 gsl_fft_complex_radix2_inverse
39 gsl_fft_complex_radix2_transform
40 gsl_fft_complex_radix2_dif_forward
41 gsl_fft_complex_radix2_dif_backward
42 gsl_fft_complex_radix2_dif_inverse
43 gsl_fft_complex_radix2_dif_transform
44 gsl_fft_complex_wavetable_alloc
45 gsl_fft_complex_wavetable_free
46 gsl_fft_complex_workspace_alloc
47 gsl_fft_complex_workspace_free
48 gsl_fft_complex_memcpy
49 gsl_fft_complex_forward
50 gsl_fft_complex_backward
51 gsl_fft_complex_inverse
52 gsl_fft_complex_transform
54 @EXPORT_halfcomplex = qw/
55 gsl_fft_halfcomplex_radix2_backward
56 gsl_fft_halfcomplex_radix2_inverse
57 gsl_fft_halfcomplex_radix2_transform
58 gsl_fft_halfcomplex_wavetable_alloc
59 gsl_fft_halfcomplex_wavetable_free
60 gsl_fft_halfcomplex_backward
61 gsl_fft_halfcomplex_inverse
62 gsl_fft_halfcomplex_transform
63 gsl_fft_halfcomplex_unpack
64 gsl_fft_halfcomplex_radix2_unpack
66 @EXPORT_real = qw/
67 gsl_fft_real_radix2_transform
68 gsl_fft_real_wavetable_alloc
69 gsl_fft_real_wavetable_free
70 gsl_fft_real_workspace_alloc
71 gsl_fft_real_workspace_free
72 gsl_fft_real_transform
73 gsl_fft_real_unpack
75 @EXPORT_vars = qw/
76 $gsl_fft_forward
77 $gsl_fft_backward
79 @EXPORT_OK = (
80 @EXPORT_real,
81 @EXPORT_complex,
82 @EXPORT_halfcomplex,
83 @EXPORT_vars,
85 %EXPORT_TAGS = (
86 all => \@EXPORT_OK,
87 real => \@EXPORT_real,
88 complex => \@EXPORT_complex,
89 halfcomplex => \@EXPORT_halfcomplex,
90 vars => \@EXPORT_vars,