From 4c3345364e079429dcfc17da63364ee75b9c0636 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Fri, 30 Oct 2009 23:38:13 -0400 Subject: moved half-spectrum logic to Eigen::FFT --- unsupported/test/FFT.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'unsupported/test/FFT.cpp') diff --git a/unsupported/test/FFT.cpp b/unsupported/test/FFT.cpp index cc68f3718..ad0d426e4 100644 --- a/unsupported/test/FFT.cpp +++ b/unsupported/test/FFT.cpp @@ -101,12 +101,34 @@ void test_scalar_generic(int nfft) ComplexVector outbuf; for (int k=0;k>1)+1); + VERIFY( fft_rmse(outbuf,inbuf) < test_precision() );// gross check + + fft.ClearFlag(fft.HalfSpectrum ); fft.fwd( outbuf,inbuf); VERIFY( fft_rmse(outbuf,inbuf) < test_precision() );// gross check ScalarVector buf3; fft.inv( buf3 , outbuf); VERIFY( dif_rmse(inbuf,buf3) < test_precision() );// gross check + + // verify that the Unscaled flag takes effect + ComplexVector buf4; + fft.SetFlag(fft.Unscaled); + fft.inv( buf4 , outbuf); + for (int k=0;k() );// gross check + + // verify that ClearFlag works + fft.ClearFlag(fft.Unscaled); + fft.inv( buf3 , outbuf); + VERIFY( dif_rmse(inbuf,buf3) < test_precision() );// gross check } template @@ -136,6 +158,19 @@ void test_complex_generic(int nfft) fft.inv( buf3 , outbuf); VERIFY( dif_rmse(inbuf,buf3) < test_precision() );// gross check + + // verify that the Unscaled flag takes effect + ComplexVector buf4; + fft.SetFlag(fft.Unscaled); + fft.inv( buf4 , outbuf); + for (int k=0;k() );// gross check + + // verify that ClearFlag works + fft.ClearFlag(fft.Unscaled); + fft.inv( buf3 , outbuf); + VERIFY( dif_rmse(inbuf,buf3) < test_precision() );// gross check } template -- cgit v1.2.3