diff options
Diffstat (limited to 'volk/lib/qa_32f_divide_aligned16.cc')
-rw-r--r-- | volk/lib/qa_32f_divide_aligned16.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/volk/lib/qa_32f_divide_aligned16.cc b/volk/lib/qa_32f_divide_aligned16.cc index 3257a3751..f2a1b9e7f 100644 --- a/volk/lib/qa_32f_divide_aligned16.cc +++ b/volk/lib/qa_32f_divide_aligned16.cc @@ -36,6 +36,7 @@ void qa_32f_divide_aligned16::t1() { float input1[vlen] __attribute__ ((aligned (16))); float output0[vlen] __attribute__ ((aligned (16))); + float output1[vlen] __attribute__ ((aligned (16))); float output_known[vlen] __attribute__ ((aligned (16))); for(int i = 0; i < vlen; ++i) { @@ -52,6 +53,14 @@ void qa_32f_divide_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_32f_divide_aligned16_manual(output1, input0, input1, vlen, "orc"); + } + end = clock(); + total = (double)(end-start)/(double)CLOCKS_PER_SEC; + printf("orc_time: %f\n", total); /* for(int i = 0; i < 10; ++i) { @@ -62,6 +71,7 @@ void qa_32f_divide_aligned16::t1() { for(int i = 0; i < vlen; ++i) { CPPUNIT_ASSERT_EQUAL(output0[i], output_known[i]); + CPPUNIT_ASSERT_EQUAL(output1[i], output_known[i]); } } @@ -79,6 +89,7 @@ void qa_32f_divide_aligned16::t1() { float output0[vlen] __attribute__ ((aligned (16))); float output01[vlen] __attribute__ ((aligned (16))); + float output02[vlen] __attribute__ ((aligned (16))); for(int i = 0; i < vlen; ++i) { input0[i] = ((float) (rand() - (RAND_MAX/2))) / static_cast<float>((RAND_MAX/2)); @@ -95,6 +106,13 @@ void qa_32f_divide_aligned16::t1() { printf("generic_time: %f\n", total); start = clock(); for(int count = 0; count < ITERS; ++count) { + volk_32f_divide_aligned16_manual(output02, input0, input1, 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_32f_divide_aligned16_manual(output01, input0, input1, vlen, "sse"); } end = clock(); @@ -108,6 +126,7 @@ void qa_32f_divide_aligned16::t1() { for(int i = 0; i < vlen; ++i) { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_EQUAL(output0[i], output01[i]); + CPPUNIT_ASSERT_EQUAL(output0[i], output02[i]); } } |