diff options
Diffstat (limited to 'volk/lib')
-rw-r--r-- | volk/lib/qa_16u_byteswap_aligned16.cc | 9 | ||||
-rw-r--r-- | volk/lib/qa_32f_add_aligned16.cc | 9 | ||||
-rw-r--r-- | volk/lib/qa_32s_and_aligned16.cc | 9 | ||||
-rw-r--r-- | volk/lib/qa_8s_convert_32f_aligned16.cc | 8 |
4 files changed, 35 insertions, 0 deletions
diff --git a/volk/lib/qa_16u_byteswap_aligned16.cc b/volk/lib/qa_16u_byteswap_aligned16.cc index 6b19828a4..c30b6ba41 100644 --- a/volk/lib/qa_16u_byteswap_aligned16.cc +++ b/volk/lib/qa_16u_byteswap_aligned16.cc @@ -24,6 +24,7 @@ void qa_16u_byteswap_aligned16::t1() { uint16_t output0[vlen] __attribute__ ((aligned (16))); uint16_t output01[vlen] __attribute__ ((aligned (16))); + uint16_t output02[vlen] __attribute__ ((aligned (16))); for(int i = 0; i < vlen; ++i) { output0[i] = (uint16_t) ((rand() - (RAND_MAX/2)) / (RAND_MAX/2)); @@ -41,6 +42,13 @@ void qa_16u_byteswap_aligned16::t1() { printf("generic_time: %f\n", total); start = clock(); for(int count = 0; count < ITERS; ++count) { + volk_16u_byteswap_aligned16_manual(output02, 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_16u_byteswap_aligned16_manual(output01, vlen, "sse2"); } end = clock(); @@ -54,6 +62,7 @@ void qa_16u_byteswap_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]); } } diff --git a/volk/lib/qa_32f_add_aligned16.cc b/volk/lib/qa_32f_add_aligned16.cc index 002aebfc9..d9214e8a2 100644 --- a/volk/lib/qa_32f_add_aligned16.cc +++ b/volk/lib/qa_32f_add_aligned16.cc @@ -78,6 +78,7 @@ void qa_32f_add_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)); @@ -94,6 +95,13 @@ void qa_32f_add_aligned16::t1() { printf("generic_time: %f\n", total); start = clock(); for(int count = 0; count < ITERS; ++count) { + volk_32f_add_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_add_aligned16_manual(output01, input0, input1, vlen, "sse"); } end = clock(); @@ -107,6 +115,7 @@ void qa_32f_add_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]); } } diff --git a/volk/lib/qa_32s_and_aligned16.cc b/volk/lib/qa_32s_and_aligned16.cc index 72d05cf6f..5720ee869 100644 --- a/volk/lib/qa_32s_and_aligned16.cc +++ b/volk/lib/qa_32s_and_aligned16.cc @@ -25,6 +25,7 @@ void qa_32s_and_aligned16::t1() { int32_t output0[vlen] __attribute__ ((aligned (16))); int32_t output01[vlen] __attribute__ ((aligned (16))); + int32_t output02[vlen] __attribute__ ((aligned (16))); for(int i = 0; i < vlen; ++i) { input0[i] = ((int32_t) (rand() - (RAND_MAX/2))); @@ -41,6 +42,13 @@ void qa_32s_and_aligned16::t1() { printf("generic_time: %f\n", total); start = clock(); for(int count = 0; count < ITERS; ++count) { + volk_32s_and_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_32s_and_aligned16_manual(output01, input0, input1, vlen, "sse"); } end = clock(); @@ -54,6 +62,7 @@ void qa_32s_and_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]); } } diff --git a/volk/lib/qa_8s_convert_32f_aligned16.cc b/volk/lib/qa_8s_convert_32f_aligned16.cc index 522da0b9d..3b3aa6919 100644 --- a/volk/lib/qa_8s_convert_32f_aligned16.cc +++ b/volk/lib/qa_8s_convert_32f_aligned16.cc @@ -40,6 +40,14 @@ void qa_8s_convert_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_8s_convert_32f_aligned16_manual(output_generic, input0, 128.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) { |