aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/FFT.cpp
diff options
context:
space:
mode:
authorGravatar Mark Borgerding <mark@borgerding.net>2009-05-25 23:06:49 -0400
committerGravatar Mark Borgerding <mark@borgerding.net>2009-05-25 23:06:49 -0400
commit03ed6f9bfb63879d475f5bb8ea46cff96063d010 (patch)
tree035a766edb754ddfd296461c5f91054cfbf3c3be /unsupported/test/FFT.cpp
parent210092d16c57ec2fd2f8f515151de284e8a737e3 (diff)
refactored ei_kissfft_impl to maintain a cache of cpx fft plans
Diffstat (limited to 'unsupported/test/FFT.cpp')
-rw-r--r--unsupported/test/FFT.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/unsupported/test/FFT.cpp b/unsupported/test/FFT.cpp
index daf397790..32d1393d0 100644
--- a/unsupported/test/FFT.cpp
+++ b/unsupported/test/FFT.cpp
@@ -44,7 +44,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";
+ cerr <<"idx\ttruth\t\tvalue\t|dif|=\n";
for (size_t k0=0;k0<fftbuf.size();++k0) {
complex<long double> acc = 0;
long double phinc = -2.*k0* M_PIl / timebuf.size();
@@ -55,7 +55,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 << "\t" << acc << "\t" << x << endl;
+ cerr << k0 << "\t" << acc << "\t" << x << "\t" << sqrt(norm(dif)) << endl;
}
cerr << "rmse:" << sqrt(difpower/totalpower) << endl;
return sqrt(difpower/totalpower);
@@ -127,8 +127,9 @@ void test_FFT()
#endif
#if 1
- CALL_SUBTEST( test_scalar<float>(45) ); CALL_SUBTEST( test_scalar<double>(45) ); CALL_SUBTEST( test_scalar<long double>(45) );
CALL_SUBTEST( test_scalar<float>(32) ); CALL_SUBTEST( test_scalar<double>(32) ); CALL_SUBTEST( test_scalar<long double>(32) );
+ CALL_SUBTEST( test_scalar<float>(45) ); CALL_SUBTEST( test_scalar<double>(45) ); CALL_SUBTEST( test_scalar<long double>(45) );
+ CALL_SUBTEST( test_scalar<float>(50) ); CALL_SUBTEST( test_scalar<double>(50) ); CALL_SUBTEST( test_scalar<long double>(50) );
CALL_SUBTEST( test_scalar<float>(256) ); CALL_SUBTEST( test_scalar<double>(256) ); CALL_SUBTEST( test_scalar<long double>(256) );
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