[vsipl++] patch: FFT 1D / 2D / M bug fixes and test enhancements.

Jules Bergmann jules at codesourcery.com
Wed May 10 03:43:17 UTC 2006


Stefan Seefeld wrote:
> The attached patch enhances the fft_be.cpp tests to cover all
> 1D, 2D, and M Fft variants, inclusively non-square and non-unit-stride
> matrices. Doing this revealed a number of (more or less subtle) bugs
> in the various backends, which are now fixed.
> 
> (There is still one case that I didn't manage to fix: the c->r dft 2D
>  case. If anybody wants to have a look, that would be appreciated.
>  The relevant code is in fft/dft.hpp:386. The appropriate tests in 
> fft_be.cpp
>  are commented out for the moment.)
> 

Stefan,

It turns out the 1D complex->real DFT was broken.  It was using the 
wrong index/exponent when calling sin_cos().  The symmetry means the 
complex values wrap around, but the exponents still progress as normal.

I believe the 1D C->R tests weren't finding this because the ramp 
function only generates real inputs.  For the 2D C->R case, the initial 
1D C->C FFT generates values with non-zero imaginary parts which trips 
up the 1D C->R bug.

				-- Jules



-- 
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dft.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20060509/8fccae19/attachment.ksh>


More information about the vsipl++ mailing list