Skip to content

Commit

Permalink
Fix/improve FFT_COMPLEX_RADIX2_DIF_FORWARD although it seems to cause…
Browse files Browse the repository at this point in the history
… memory corruption 1 out of 100 times :(
  • Loading branch information
leto committed Oct 7, 2016
1 parent f938be6 commit 51e4ba0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions t/FFT.t
Expand Up @@ -103,13 +103,19 @@ sub FFT_REAL_RADIX2_TRANSFORM : Tests
#my ($status4,$output4) = gsl_fft_halfcomplex_radix2_unpack($output, 1, $N);
#ok_status($status4);
}

sub FFT_COMPLEX_RADIX2_DIF_FORWARD : Tests
{
my $data = [ 0 .. 7 ];
my $N = @$data;
my ($status2, $output2) = gsl_fft_complex_radix2_dif_forward ($data, 2, $N);
my $data = [ 0 .. 7 ];
my $N = @$data;
my $stride = 1;
my ($status1, $output1) = gsl_fft_complex_radix2_dif_forward ($data, $stride, $N/2);
ok_status($status1);
ok( @$output1 == $N/2 );

my ($status2, $output2) = gsl_fft_complex_radix2_dif_backward ($output1, $stride, $N/2);
ok_status($status2);
ok( @$output2 == $N );
ok( @$output2 == $N/2 );
}

sub FFT_COMPLEX_RADIX2_FORWARD : Tests
Expand Down

0 comments on commit 51e4ba0

Please sign in to comment.