aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/FFT.cpp
diff options
context:
space:
mode:
authorGravatar Mark Borgerding <mark@borgerding.net>2009-05-23 12:50:07 -0400
committerGravatar Mark Borgerding <mark@borgerding.net>2009-05-23 12:50:07 -0400
commit304798817268706463f3ff645c8c8b2c887c090a (patch)
treea0ba69cd7e6891d0be6c036816258486830c81b5 /unsupported/test/FFT.cpp
parent9c0fcd0f6213143216710a5b215aa2bb4a857ce5 (diff)
scalar forward FFT optimized for even size, converts to cpx for odd
Diffstat (limited to 'unsupported/test/FFT.cpp')
-rw-r--r--unsupported/test/FFT.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/unsupported/test/FFT.cpp b/unsupported/test/FFT.cpp
index 13e98ba77..41c7fed7b 100644
--- a/unsupported/test/FFT.cpp
+++ b/unsupported/test/FFT.cpp
@@ -41,6 +41,7 @@ complex<long double> promote(long double x) { return complex<long double>( x);
{
long double totalpower=0;
long double difpower=0;
+ cerr <<"idx\ttruth\t\tvalue\n";
for (size_t k0=0;k0<fftbuf.size();++k0) {
complex<long double> acc = 0;
long double phinc = -2.*k0* M_PIl / timebuf.size();
@@ -51,7 +52,7 @@ complex<long double> promote(long double x) { return complex<long double>( x);
complex<long double> x = promote(fftbuf[k0]);
complex<long double> dif = acc - x;
difpower += norm(dif);
- cerr << k0 << ":" << acc << " " << x << endl;
+ cerr << k0 << "\t" << acc << "\t" << x << endl;
}
cerr << "rmse:" << sqrt(difpower/totalpower) << endl;
return sqrt(difpower/totalpower);
@@ -108,6 +109,7 @@ void test_complex(int nfft)
void test_FFT()
{
+#if 0
CALL_SUBTEST( test_complex<float>(32) ); CALL_SUBTEST( test_complex<double>(32) ); CALL_SUBTEST( test_complex<long double>(32) );
CALL_SUBTEST( test_complex<float>(1024) ); CALL_SUBTEST( test_complex<double>(1024) ); CALL_SUBTEST( test_complex<long double>(1024) );
CALL_SUBTEST( test_complex<float>(3*8) ); CALL_SUBTEST( test_complex<double>(3*8) ); CALL_SUBTEST( test_complex<long double>(3*8) );
@@ -115,9 +117,11 @@ void test_FFT()
CALL_SUBTEST( test_complex<float>(2*3*4) ); CALL_SUBTEST( test_complex<double>(2*3*4) ); CALL_SUBTEST( test_complex<long double>(2*3*4) );
CALL_SUBTEST( test_complex<float>(2*3*4*5) ); CALL_SUBTEST( test_complex<double>(2*3*4*5) ); CALL_SUBTEST( test_complex<long double>(2*3*4*5) );
CALL_SUBTEST( test_complex<float>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<double>(2*3*4*5*7) ); CALL_SUBTEST( test_complex<long double>(2*3*4*5*7) );
-/*
+#endif
+
+#if 1
CALL_SUBTEST( test_scalar<float>(32) ); CALL_SUBTEST( test_scalar<double>(32) ); CALL_SUBTEST( test_scalar<long double>(32) );
CALL_SUBTEST( test_scalar<float>(1024) ); CALL_SUBTEST( test_scalar<double>(1024) ); CALL_SUBTEST( test_scalar<long double>(1024) );
CALL_SUBTEST( test_scalar<float>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<double>(2*3*4*5*7) ); CALL_SUBTEST( test_scalar<long double>(2*3*4*5*7) );
- */
+#endif
}