diff options
author | Nick Foster | 2010-12-15 16:27:42 -0800 |
---|---|---|
committer | Nick Foster | 2010-12-15 16:27:42 -0800 |
commit | 15ad4b5398e474bfb52fdb7e826b69f3e398c0b0 (patch) | |
tree | 1258d6349de630194341bdaab76628a9f9cc9ec2 /volk/lib/qa_16sc_magnitude_32f_aligned16.cc | |
parent | f9ee6a55cb397f9302769a25a8c959fa162354f0 (diff) | |
download | gnuradio-15ad4b5398e474bfb52fdb7e826b69f3e398c0b0.tar.gz gnuradio-15ad4b5398e474bfb52fdb7e826b69f3e398c0b0.tar.bz2 gnuradio-15ad4b5398e474bfb52fdb7e826b69f3e398c0b0.zip |
Volk: A bunch of new ORC routines plus tests.
Also fixed a typo in the generic version of 16sc_magnitude_16s_a16.
Diffstat (limited to 'volk/lib/qa_16sc_magnitude_32f_aligned16.cc')
-rw-r--r-- | volk/lib/qa_16sc_magnitude_32f_aligned16.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/volk/lib/qa_16sc_magnitude_32f_aligned16.cc b/volk/lib/qa_16sc_magnitude_32f_aligned16.cc index 2c9e48f6e..e7178863c 100644 --- a/volk/lib/qa_16sc_magnitude_32f_aligned16.cc +++ b/volk/lib/qa_16sc_magnitude_32f_aligned16.cc @@ -15,6 +15,7 @@ void qa_16sc_magnitude_32f_aligned16::t1() { std::complex<int16_t> input0[vlen] __attribute__ ((aligned (16))); float output_generic[vlen] __attribute__ ((aligned (16))); + float output_orc[vlen] __attribute__ ((aligned (16))); float output_known[vlen] __attribute__ ((aligned (16))); int16_t* inputLoad = (int16_t*)input0; @@ -37,6 +38,14 @@ void qa_16sc_magnitude_32f_aligned16::t1() { end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("generic_time: %f\n", total); + + start = clock(); + for(int count = 0; count < ITERS; ++count) { + volk_16sc_magnitude_32f_aligned16_manual(output_orc, input0, scale, vlen, "orc"); + } + end = clock(); + total = (double)(end-start)/(double)CLOCKS_PER_SEC; + printf("orc_time: %f\n", total); /* for(int i = 0; i < 100; ++i) { @@ -48,6 +57,7 @@ void qa_16sc_magnitude_32f_aligned16::t1() { for(int i = 0; i < vlen; ++i) { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_DOUBLES_EQUAL(output_generic[i], output_known[i], fabs(output_generic[i])*1e-4); + CPPUNIT_ASSERT_DOUBLES_EQUAL(output_orc[i], output_known[i], fabs(output_generic[i])*1e-4); } } @@ -63,6 +73,7 @@ void qa_16sc_magnitude_32f_aligned16::t1() { std::complex<int16_t> input0[vlen] __attribute__ ((aligned (16))); float output_generic[vlen] __attribute__ ((aligned (16))); + float output_orc[vlen] __attribute__ ((aligned (16))); float output_sse[vlen] __attribute__ ((aligned (16))); float output_sse3[vlen] __attribute__ ((aligned (16))); @@ -81,6 +92,14 @@ void qa_16sc_magnitude_32f_aligned16::t1() { printf("generic_time: %f\n", total); start = clock(); for(int count = 0; count < ITERS; ++count) { + volk_16sc_magnitude_32f_aligned16_manual(output_orc, input0, 32768.0, vlen, "orc"); + } + end = clock(); + total = (double)(end-start)/(double)CLOCKS_PER_SEC; + printf("orc_time: %f\n", total); + + start = clock(); + for(int count = 0; count < ITERS; ++count) { volk_16sc_magnitude_32f_aligned16_manual(output_sse, input0, 32768.0, vlen, "sse"); } end = clock(); @@ -104,6 +123,7 @@ void qa_16sc_magnitude_32f_aligned16::t1() { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_DOUBLES_EQUAL(output_generic[i], output_sse[i], fabs(output_generic[i])*1e-4); CPPUNIT_ASSERT_DOUBLES_EQUAL(output_generic[i], output_sse3[i], fabs(output_generic[i])*1e-4); + CPPUNIT_ASSERT_DOUBLES_EQUAL(output_generic[i], output_orc[i], fabs(output_generic[i])*1e-4); } } |