[PATCH] #if out FFT tests when not config'd
Nathan (Jasper) Myers
ncm at codesourcery.com
Mon Sep 26 08:26:27 UTC 2005
This patch adds #if blocks around tests that depend on FFT support,
pending addition of native FFT code to fill in lacunae. It also adds
tests using double and complex<double>. Note this does not patch the
tests in ref-impl.
OK to apply?
Nathan Myers
ncm
Index: ChangeLog
===================================================================
RCS file: /home/cvs/Repository/vpp/ChangeLog,v
retrieving revision 1.271
diff -u -p -r1.271 ChangeLog
--- ChangeLog 23 Sep 2005 19:21:36 -0000 1.271
+++ ChangeLog 26 Sep 2005 08:26:47 -0000
@@ -1,3 +1,9 @@
+2005-09-26 Nathan Myers <ncm at codesourcery.com>
+
+ * tests/extdata-fft.cpp, tests/fft.cpp, tests/fftm-par.cpp,
+ tests/fftm.cpp: #if out tests that depend on FFT where FFT
+ is not enabled; add tests for double-precision.
+
2005-09-23 Jules Bergmann <jules at codesourcery.com>
* VERSIONS: New file, describes varius CVS tagged versions of
@@ -32,7 +38,8 @@
2005-09-20 Stefan Seefeld <stefan at codesourcery.com>
- * tests/QMTest/vpp_database.py: Make qmtest properly scan subdirectories.
+ * tests/QMTest/vpp_database.py: Make qmtest properly scan
+ subdirectories.
2005-09-19 Don McCoy <don at codesourcery.com>
Index: tests/extdata-fft.cpp
===================================================================
RCS file: /home/cvs/Repository/vpp/tests/extdata-fft.cpp,v
retrieving revision 1.3
diff -u -p -r1.3 extdata-fft.cpp
--- tests/extdata-fft.cpp 18 Jun 2005 16:40:45 -0000 1.3
+++ tests/extdata-fft.cpp 26 Sep 2005 08:26:48 -0000
@@ -314,11 +314,10 @@ test_fft_1d(length_type size, int k)
fft("subvector", in(Domain<1>(size)), out(Domain<1>(size)));
}
-
-
int
main()
{
test_fft_1d<Test_FFT_inter, impl::Fast_block<1, complex<float> > >(256, 3);
test_fft_1d<Test_FFT_split, impl::Fast_block<1, complex<float> > >(256, 3);
+ return 0;
}
Index: tests/fft.cpp
===================================================================
RCS file: /home/cvs/Repository/vpp/tests/fft.cpp,v
retrieving revision 1.6
diff -u -p -r1.6 fft.cpp
--- tests/fft.cpp 19 Sep 2005 03:39:54 -0000 1.6
+++ tests/fft.cpp 26 Sep 2005 08:26:48 -0000
@@ -313,6 +313,8 @@ main()
{
vsipl init;
+#if defined(VSIP_IMPL_FFT_USE_FLOAT)
+
test_by_ref<complex<float> >(2, 64);
test_by_ref<complex<float> >(1, 68);
test_by_ref<complex<float> >(2, 256);
@@ -326,4 +328,26 @@ main()
test_real<float>(1, 128);
test_real<float>(2, 242);
test_real<float>(3, 16);
+
+#endif
+
+#if defined(VSIP_IMPL_FFT_USE_DOUBLE)
+
+ test_by_ref<complex<double> >(2, 64);
+ test_by_ref<complex<double> >(1, 68);
+ test_by_ref<complex<double> >(2, 256);
+ test_by_ref<complex<double> >(2, 252);
+ test_by_ref<complex<double> >(3, 17);
+
+ test_by_val<complex<double> >(1, 128);
+ test_by_val<complex<double> >(2, 256);
+ test_by_val<complex<double> >(3, 512);
+
+ test_real<double>(1, 128);
+ test_real<double>(2, 242);
+ test_real<double>(3, 16);
+
+#endif
+
+ return 0;
}
Index: tests/fftm-par.cpp
===================================================================
RCS file: /home/cvs/Repository/vpp/tests/fftm-par.cpp,v
retrieving revision 1.3
diff -u -p -r1.3 fftm-par.cpp
--- tests/fftm-par.cpp 19 Sep 2005 03:39:54 -0000 1.3
+++ tests/fftm-par.cpp 26 Sep 2005 08:26:48 -0000
@@ -733,6 +733,7 @@ main(int argc, char** argv)
comm.barrier();
#endif
+#if defined(VSIP_IMPL_FFT_USE_FLOAT)
test_by_ref_x<complex<float> >(18);
test_by_ref_x<complex<float> >(64);
test_by_ref_x<complex<float> >(68);
@@ -749,11 +750,38 @@ main(int argc, char** argv)
test_by_val_y<complex<float> >(18);
test_by_val_y<complex<float> >(256);
-#if 0
+# if 0
// Tests for test r->c, c->r.
test_real<float>(128);
test_real<float>(242);
test_real<float>(16);
+# endif
#endif
+
+#if defined(VSIP_IMPL_FFT_USE_DOUBLE)
+ test_by_ref_x<complex<double> >(18);
+ test_by_ref_x<complex<double> >(64);
+ test_by_ref_x<complex<double> >(68);
+ test_by_ref_x<complex<double> >(256);
+ test_by_ref_x<complex<double> >(252);
+
+ test_by_ref_y<complex<double> >(68);
+ test_by_ref_y<complex<double> >(256);
+
+ test_by_val_x<complex<double> >(128);
+ test_by_val_x<complex<double> >(256);
+ test_by_val_x<complex<double> >(512);
+
+ test_by_val_y<complex<double> >(18);
+ test_by_val_y<complex<double> >(256);
+
+# if 0
+ // Tests for test r->c, c->r.
+ test_real<double>(128);
+ test_real<double>(242);
+ test_real<double>(16);
+# endif
+#endif
+
return 0;
}
Index: tests/fftm.cpp
===================================================================
RCS file: /home/cvs/Repository/vpp/tests/fftm.cpp,v
retrieving revision 1.6
diff -u -p -r1.6 fftm.cpp
--- tests/fftm.cpp 19 Sep 2005 03:39:54 -0000 1.6
+++ tests/fftm.cpp 26 Sep 2005 08:26:48 -0000
@@ -477,6 +477,7 @@ main()
{
vsipl init;
+#if defined(VSIP_IMPL_FFT_USE_FLOAT)
test_by_ref_x<complex<float> >(18);
test_by_ref_x<complex<float> >(64);
test_by_ref_x<complex<float> >(68);
@@ -493,10 +494,38 @@ main()
test_by_val_y<complex<float> >(18);
test_by_val_y<complex<float> >(256);
-#if 0
+# if 0
// Tests for test r->c, c->r.
test_real<float>(128);
test_real<float>(242);
test_real<float>(16);
+# endif
#endif
+
+#if defined(VSIP_IMPL_FFT_USE_DOUBLE)
+ test_by_ref_x<complex<double> >(18);
+ test_by_ref_x<complex<double> >(64);
+ test_by_ref_x<complex<double> >(68);
+ test_by_ref_x<complex<double> >(256);
+ test_by_ref_x<complex<double> >(252);
+
+ test_by_ref_y<complex<double> >(68);
+ test_by_ref_y<complex<double> >(256);
+
+ test_by_val_x<complex<double> >(128);
+ test_by_val_x<complex<double> >(256);
+ test_by_val_x<complex<double> >(512);
+
+ test_by_val_y<complex<double> >(18);
+ test_by_val_y<complex<double> >(256);
+
+# if 0
+ // Tests for test r->c, c->r.
+ test_real<double>(128);
+ test_real<double>(242);
+ test_real<double>(16);
+# endif
+#endif
+
+ return 0;
}
More information about the vsipl++
mailing list