diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-02-02 14:21:46 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-02-02 14:21:46 -0500 |
commit | b806f6e95cd917e54884841c8e7928204ecd78f8 (patch) | |
tree | 90b8a7bc9967567ef1c841a38189edd212f14352 | |
parent | 736874202f15222fa3ec10ceeb1815e8a595ed3a (diff) |
volk: updating to readd unaligned dot product under new name scheme.
-rw-r--r-- | volk/include/volk/Makefile.am | 1 | ||||
-rw-r--r-- | volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h (renamed from volk/include/volk/volk_32fc_conjugate_dot_prod_unaligned.h) | 10 | ||||
-rw-r--r-- | volk/lib/qa_32fc_conjugate_dot_prod_unaligned.h | 18 | ||||
-rw-r--r-- | volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc (renamed from volk/lib/qa_32fc_conjugate_dot_prod_unaligned.cc) | 22 | ||||
-rw-r--r-- | volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.h | 18 | ||||
-rw-r--r-- | volk/lib/qa_volk.cc | 213 | ||||
-rw-r--r-- | volk/lib/testqa.cc | 1 |
7 files changed, 36 insertions, 247 deletions
diff --git a/volk/include/volk/Makefile.am b/volk/include/volk/Makefile.am index eb97775b0a..7a5edd6243 100644 --- a/volk/include/volk/Makefile.am +++ b/volk/include/volk/Makefile.am @@ -66,6 +66,7 @@ volkinclude_HEADERS = \ volk_32f_s32f_calc_spectral_noise_floor_32f_a16.h \ volk_32fc_s32f_atan2_32f_a16.h \ volk_32fc_x2_conjugate_dot_prod_32fc_a16.h \ + volk_32fc_x2_conjugate_dot_prod_32fc_u.h \ volk_32fc_deinterleave_32f_x2_a16.h \ volk_32fc_deinterleave_64f_x2_a16.h \ volk_32fc_s32f_deinterleave_real_16i_a16.h \ diff --git a/volk/include/volk/volk_32fc_conjugate_dot_prod_unaligned.h b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h index ead1573fec..2fa5918cc7 100644 --- a/volk/include/volk/volk_32fc_conjugate_dot_prod_unaligned.h +++ b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h @@ -1,5 +1,5 @@ -#ifndef INCLUDED_VOLK_32fc_CONJUGATE_DOT_PROD_UNALIGNED_H -#define INCLUDED_VOLK_32fc_CONJUGATE_DOT_PROD_UNALIGNED_H +#ifndef INCLUDED_volk_32fc_x2_conjugate_dot_prod_32fc_u_H +#define INCLUDED_volk_32fc_x2_conjugate_dot_prod_32fc_u_H #include<volk/volk_complex.h> @@ -8,7 +8,7 @@ #if LV_HAVE_GENERIC -static inline void volk_32fc_conjugate_dot_prod_unaligned_generic(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { +static inline void volk_32fc_x2_conjugate_dot_prod_32fc_u_generic(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { float * res = (float*) result; float * in = (float*) input; @@ -64,7 +64,7 @@ static inline void volk_32fc_conjugate_dot_prod_unaligned_generic(lv_32fc_t* res #include <mmintrin.h> -static inline void volk_32fc_conjugate_dot_prod_unaligned_sse3(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { +static inline void volk_32fc_x2_conjugate_dot_prod_32fc_u_sse3(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { static const uint32_t conjugator[4] __attribute__((aligned(16)))= {0x00000000, 0x80000000, 0x00000000, 0x80000000}; @@ -138,7 +138,7 @@ static inline void volk_32fc_conjugate_dot_prod_unaligned_sse3(lv_32fc_t* result #endif /*LV_HAVE_SSE3*/ -#endif /*INCLUDED_VOLK_32fc_CONJUGATE_DOT_PROD_UNALIGNED_H*/ +#endif /*INCLUDED_volk_32fc_x2_conjugate_dot_prod_32fc_u_H*/ diff --git a/volk/lib/qa_32fc_conjugate_dot_prod_unaligned.h b/volk/lib/qa_32fc_conjugate_dot_prod_unaligned.h deleted file mode 100644 index 7aead53a13..0000000000 --- a/volk/lib/qa_32fc_conjugate_dot_prod_unaligned.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef INCLUDED_QA_32FC_CONJUGATE_DOT_PROD_UNALIGNED_H -#define INCLUDED_QA_32FC_CONJUGATE_DOT_PROD_UNALIGNED_H - -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/TestCase.h> - -class qa_32fc_conjugate_dot_prod_unaligned : public CppUnit::TestCase { - - CPPUNIT_TEST_SUITE (qa_32fc_conjugate_dot_prod_unaligned); - CPPUNIT_TEST (t1); - CPPUNIT_TEST_SUITE_END (); - - private: - void t1 (); -}; - - -#endif /* INCLUDED_QA_32FC_CONJUGATE_DOT_PROD_UNALIGNED_H */ diff --git a/volk/lib/qa_32fc_conjugate_dot_prod_unaligned.cc b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc index a0680bab69..fefdf06eeb 100644 --- a/volk/lib/qa_32fc_conjugate_dot_prod_unaligned.cc +++ b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc @@ -1,5 +1,5 @@ #include <volk/volk.h> -#include <qa_32fc_conjugate_dot_prod_unaligned.h> +#include <qa_32fc_x2_conjugate_dot_prod_32fc_u.h> #include <stdlib.h> #include <math.h> #include <time.h> @@ -27,9 +27,9 @@ random_floats (float *buf, unsigned n) } -void qa_32fc_conjugate_dot_prod_unaligned::t1() { +void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { const int vlen = 789743; - + volk_environment_init(); int ret; @@ -53,12 +53,12 @@ void qa_32fc_conjugate_dot_prod_unaligned::t1() { - volk_32fc_conjugate_dot_prod_unaligned_manual(result_generic, input, taps, vlen * 8, "generic"); + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result_generic, input, taps, vlen * 8, "generic"); - volk_32fc_conjugate_dot_prod_unaligned_manual(result, input, taps, vlen * 8, "sse"); + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result, input, taps, vlen * 8, "sse"); - printf("32fc_conjugate_dot_prod_unaligned\n"); + printf("32fc_x2_conjugate_dot_prod_32fc_u\n"); printf("generic: %f +i%f ... sse: %f +i%f\n", std::real(result_generic[0]), std::imag(result_generic[0]), std::real(result[0]), std::imag(result[0])); assertcomplexEqual(result_generic[0], result[0], ERR_DELTA); @@ -85,7 +85,7 @@ random_floats (float *buf, unsigned n) } -void qa_32fc_conjugate_dot_prod_unaligned::t1() { +void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { const int vlen = 789743; volk_environment_init(); @@ -111,12 +111,12 @@ void qa_32fc_conjugate_dot_prod_unaligned::t1() { - volk_32fc_conjugate_dot_prod_unaligned_manual(result_generic, input, taps, vlen * 8, "generic"); + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result_generic, input, taps, vlen * 8, "generic"); - volk_32fc_conjugate_dot_prod_unaligned_manual(result, input, taps, vlen * 8, "sse_32"); + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result, input, taps, vlen * 8, "sse_32"); - printf("32fc_conjugate_dot_prod_unaligned\n"); + printf("32fc_x2_conjugate_dot_prod_32fc_u\n"); printf("generic: %f +i%f ... sse: %f +i%f\n", std::real(result_generic[0]), std::imag(result_generic[0]), std::real(result[0]), std::imag(result[0])); assertcomplexEqual(result_generic[0], result[0], ERR_DELTA); @@ -131,7 +131,7 @@ void qa_32fc_conjugate_dot_prod_unaligned::t1() { #else -void qa_32fc_conjugate_dot_prod_unaligned::t1() { +void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { printf("sse not available... no test performed\n"); } diff --git a/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.h b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.h new file mode 100644 index 0000000000..f07402403a --- /dev/null +++ b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.h @@ -0,0 +1,18 @@ +#ifndef INCLUDED_QA_32FC_X2_CONJUGATE_DOT_PROD_32FC_U_H +#define INCLUDED_QA_32FC_X2_CONJUGATE_DOT_PROD_32FC_U_H + +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/TestCase.h> + +class qa_32fc_x2_conjugate_dot_prod_32fc_u : public CppUnit::TestCase { + + CPPUNIT_TEST_SUITE (qa_32fc_x2_conjugate_dot_prod_32fc_u); + CPPUNIT_TEST (t1); + CPPUNIT_TEST_SUITE_END (); + + private: + void t1 (); +}; + + +#endif /* INCLUDED_QA_32FC_X2_CONJUGATE_DOT_PROD_32FC_U_H */ diff --git a/volk/lib/qa_volk.cc b/volk/lib/qa_volk.cc deleted file mode 100644 index 98d3e9728d..0000000000 --- a/volk/lib/qa_volk.cc +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -/* - * This class gathers together all the test cases for the example - * directory into a single test suite. As you create new test cases, - * add them here. - */ - -#include <qa_volk.h> -#include <qa_16s_quad_max_star_aligned16.h> -#include <qa_32fc_dot_prod_aligned16.h> -#include <qa_32fc_square_dist_aligned16.h> -#include <qa_32fc_square_dist_scalar_mult_aligned16.h> -#include <qa_32f_sum_of_poly_aligned16.h> -#include <qa_32fc_index_max_aligned16.h> -#include <qa_32f_index_max_aligned16.h> -#include <qa_32fc_conjugate_dot_prod_aligned16.h> -#include <qa_32fc_conjugate_dot_prod_unaligned.h> -#include <qa_16s_permute_and_scalar_add_aligned16.h> -#include <qa_16s_branch_4_state_8_aligned16.h> -#include <qa_16s_max_star_horizontal_aligned16.h> -#include <qa_16s_max_star_aligned16.h> -#include <qa_16s_add_quad_aligned16.h> -#include <qa_32f_add_aligned16.h> -#include <qa_32f_subtract_aligned16.h> -#include <qa_32f_max_aligned16.h> -#include <qa_32f_min_aligned16.h> -#include <qa_64f_max_aligned16.h> -#include <qa_64f_min_aligned16.h> -#include <qa_32s_and_aligned16.h> -#include <qa_32s_or_aligned16.h> -#include <qa_32f_dot_prod_aligned16.h> -#include <qa_32f_dot_prod_unaligned16.h> -#include <qa_32f_fm_detect_aligned16.h> -#include <qa_32fc_32f_multiply_aligned16.h> -#include <qa_32fc_multiply_aligned16.h> -#include <qa_32f_divide_aligned16.h> -#include <qa_32f_multiply_aligned16.h> -#include <qa_32f_sqrt_aligned16.h> -#include <qa_8sc_multiply_conjugate_16sc_aligned16.h> -#include <qa_8sc_multiply_conjugate_32fc_aligned16.h> -#include <qa_32u_popcnt_aligned16.h> -#include <qa_64u_popcnt_aligned16.h> -#include <qa_16u_byteswap_aligned16.h> -#include <qa_32u_byteswap_aligned16.h> -#include <qa_64u_byteswap_aligned16.h> -#include <qa_32f_normalize_aligned16.h> -#include <qa_16sc_deinterleave_16s_aligned16.h> -#include <qa_16sc_deinterleave_32f_aligned16.h> -#include <qa_16sc_deinterleave_real_16s_aligned16.h> -#include <qa_16sc_deinterleave_real_32f_aligned16.h> -#include <qa_16sc_deinterleave_real_8s_aligned16.h> -#include <qa_16sc_magnitude_16s_aligned16.h> -#include <qa_16sc_magnitude_32f_aligned16.h> -#include <qa_32fc_deinterleave_32f_aligned16.h> -#include <qa_32fc_deinterleave_64f_aligned16.h> -#include <qa_32fc_deinterleave_real_16s_aligned16.h> -#include <qa_32fc_deinterleave_real_32f_aligned16.h> -#include <qa_32fc_deinterleave_real_64f_aligned16.h> -#include <qa_32fc_magnitude_16s_aligned16.h> -#include <qa_32fc_magnitude_32f_aligned16.h> -#include <qa_32f_interleave_16sc_aligned16.h> -#include <qa_32f_interleave_32fc_aligned16.h> -#include <qa_8sc_deinterleave_16s_aligned16.h> -#include <qa_8sc_deinterleave_32f_aligned16.h> -#include <qa_8sc_deinterleave_real_16s_aligned16.h> -#include <qa_8sc_deinterleave_real_32f_aligned16.h> -#include <qa_8sc_deinterleave_real_8s_aligned16.h> -#include <qa_16s_convert_32f_aligned16.h> -#include <qa_16s_convert_32f_unaligned16.h> -#include <qa_16s_convert_8s_aligned16.h> -#include <qa_16s_convert_8s_unaligned16.h> -#include <qa_32f_convert_16s_aligned16.h> -#include <qa_32f_convert_16s_unaligned16.h> -#include <qa_32f_convert_32s_aligned16.h> -#include <qa_32f_convert_32s_unaligned16.h> -#include <qa_32f_convert_64f_aligned16.h> -#include <qa_32f_convert_64f_unaligned16.h> -#include <qa_32f_convert_8s_aligned16.h> -#include <qa_32f_convert_8s_unaligned16.h> -#include <qa_32s_convert_32f_aligned16.h> -#include <qa_32s_convert_32f_unaligned16.h> -#include <qa_64f_convert_32f_aligned16.h> -#include <qa_64f_convert_32f_unaligned16.h> -#include <qa_8s_convert_16s_aligned16.h> -#include <qa_8s_convert_16s_unaligned16.h> -#include <qa_8s_convert_32f_aligned16.h> -#include <qa_8s_convert_32f_unaligned16.h> -#include <qa_32fc_32f_power_32fc_aligned16.h> -#include <qa_32f_power_aligned16.h> -#include <qa_32fc_atan2_32f_aligned16.h> -#include <qa_32fc_power_spectral_density_32f_aligned16.h> -#include <qa_32fc_power_spectrum_32f_aligned16.h> -#include <qa_32f_calc_spectral_noise_floor_aligned16.h> -#include <qa_32f_accumulator_aligned16.h> -#include <qa_32f_stddev_aligned16.h> -#include <qa_32f_stddev_and_mean_aligned16.h> - -CppUnit::TestSuite * -qa_volk::suite() -{ - CppUnit::TestSuite *s = new CppUnit::TestSuite("volk"); - - s->addTest(qa_16s_quad_max_star_aligned16::suite()); - s->addTest(qa_32fc_dot_prod_aligned16::suite()); - s->addTest(qa_32fc_square_dist_scalar_mult_aligned16::suite()); - s->addTest(qa_32fc_square_dist_aligned16::suite()); - s->addTest(qa_32f_sum_of_poly_aligned16::suite()); - s->addTest(qa_32fc_index_max_aligned16::suite()); - s->addTest(qa_32f_index_max_aligned16::suite()); - s->addTest(qa_32fc_conjugate_dot_prod_aligned16::suite()); - s->addTest(qa_32fc_conjugate_dot_prod_unaligned::suite()); - s->addTest(qa_16s_permute_and_scalar_add_aligned16::suite()); - s->addTest(qa_16s_branch_4_state_8_aligned16::suite()); - s->addTest(qa_16s_max_star_horizontal_aligned16::suite()); - s->addTest(qa_16s_max_star_aligned16::suite()); - s->addTest(qa_16s_add_quad_aligned16::suite()); - s->addTest(qa_32f_add_aligned16::suite()); - s->addTest(qa_32f_subtract_aligned16::suite()); - s->addTest(qa_32f_max_aligned16::suite()); - s->addTest(qa_32f_min_aligned16::suite()); - s->addTest(qa_64f_max_aligned16::suite()); - s->addTest(qa_64f_min_aligned16::suite()); - s->addTest(qa_32s_and_aligned16::suite()); - s->addTest(qa_32s_or_aligned16::suite()); - s->addTest(qa_32f_dot_prod_aligned16::suite()); - s->addTest(qa_32f_dot_prod_unaligned16::suite()); - s->addTest(qa_32f_fm_detect_aligned16::suite()); - s->addTest(qa_32fc_32f_multiply_aligned16::suite()); - s->addTest(qa_32fc_multiply_aligned16::suite()); - s->addTest(qa_32f_divide_aligned16::suite()); - s->addTest(qa_32f_multiply_aligned16::suite()); - s->addTest(qa_32f_sqrt_aligned16::suite()); - s->addTest(qa_8sc_multiply_conjugate_16sc_aligned16::suite()); - s->addTest(qa_8sc_multiply_conjugate_32fc_aligned16::suite()); - s->addTest(qa_32u_popcnt_aligned16::suite()); - s->addTest(qa_64u_popcnt_aligned16::suite()); - s->addTest(qa_16u_byteswap_aligned16::suite()); - s->addTest(qa_32u_byteswap_aligned16::suite()); - s->addTest(qa_64u_byteswap_aligned16::suite()); - s->addTest(qa_32f_normalize_aligned16::suite()); - s->addTest(qa_16sc_deinterleave_16s_aligned16::suite()); - s->addTest(qa_16sc_deinterleave_32f_aligned16::suite()); - s->addTest(qa_16sc_deinterleave_real_16s_aligned16::suite()); - s->addTest(qa_16sc_deinterleave_real_32f_aligned16::suite()); - s->addTest(qa_16sc_deinterleave_real_8s_aligned16::suite()); - s->addTest(qa_16sc_magnitude_16s_aligned16::suite()); - s->addTest(qa_16sc_magnitude_32f_aligned16::suite()); - s->addTest(qa_32fc_deinterleave_32f_aligned16::suite()); - s->addTest(qa_32fc_deinterleave_64f_aligned16::suite()); - s->addTest(qa_32fc_deinterleave_real_16s_aligned16::suite()); - s->addTest(qa_32fc_deinterleave_real_32f_aligned16::suite()); - s->addTest(qa_32fc_deinterleave_real_64f_aligned16::suite()); - s->addTest(qa_32fc_magnitude_16s_aligned16::suite()); - s->addTest(qa_32fc_magnitude_32f_aligned16::suite()); - s->addTest(qa_32f_interleave_16sc_aligned16::suite()); - s->addTest(qa_32f_interleave_32fc_aligned16::suite()); - s->addTest(qa_8sc_deinterleave_16s_aligned16::suite()); - s->addTest(qa_8sc_deinterleave_32f_aligned16::suite()); - s->addTest(qa_8sc_deinterleave_real_16s_aligned16::suite()); - s->addTest(qa_8sc_deinterleave_real_32f_aligned16::suite()); - s->addTest(qa_8sc_deinterleave_real_8s_aligned16::suite()); - s->addTest(qa_16s_convert_32f_aligned16::suite()); - s->addTest(qa_16s_convert_32f_unaligned16::suite()); - s->addTest(qa_16s_convert_8s_aligned16::suite()); - s->addTest(qa_16s_convert_8s_unaligned16::suite()); - s->addTest(qa_32f_convert_16s_aligned16::suite()); - s->addTest(qa_32f_convert_16s_unaligned16::suite()); - s->addTest(qa_32f_convert_32s_aligned16::suite()); - s->addTest(qa_32f_convert_32s_unaligned16::suite()); - s->addTest(qa_32f_convert_64f_aligned16::suite()); - s->addTest(qa_32f_convert_64f_unaligned16::suite()); - s->addTest(qa_32f_convert_8s_aligned16::suite()); - s->addTest(qa_32f_convert_8s_unaligned16::suite()); - s->addTest(qa_32s_convert_32f_aligned16::suite()); - s->addTest(qa_32s_convert_32f_unaligned16::suite()); - s->addTest(qa_64f_convert_32f_aligned16::suite()); - s->addTest(qa_64f_convert_32f_unaligned16::suite()); - s->addTest(qa_8s_convert_16s_aligned16::suite()); - s->addTest(qa_8s_convert_16s_unaligned16::suite()); - s->addTest(qa_8s_convert_32f_aligned16::suite()); - s->addTest(qa_8s_convert_32f_unaligned16::suite()); - s->addTest(qa_32fc_32f_power_32fc_aligned16::suite()); - s->addTest(qa_32f_power_aligned16::suite()); - s->addTest(qa_32fc_atan2_32f_aligned16::suite()); - s->addTest(qa_32fc_power_spectral_density_32f_aligned16::suite()); - s->addTest(qa_32fc_power_spectrum_32f_aligned16::suite()); - s->addTest(qa_32f_calc_spectral_noise_floor_aligned16::suite()); - s->addTest(qa_32f_accumulator_aligned16::suite()); - s->addTest(qa_32f_stddev_aligned16::suite()); - s->addTest(qa_32f_stddev_and_mean_aligned16::suite()); - - return s; -} diff --git a/volk/lib/testqa.cc b/volk/lib/testqa.cc index f336708568..779bc61eb3 100644 --- a/volk/lib/testqa.cc +++ b/volk/lib/testqa.cc @@ -33,6 +33,7 @@ BOOST_AUTO_TEST_CASE(volk_test_all) { VOLK_RUN_TESTS(volk_32f_s32f_calc_spectral_noise_floor_32f_a16, 1e-4, 20.0, 2046, 10000); VOLK_RUN_TESTS(volk_32fc_s32f_atan2_32f_a16, 1e-4, 10.0, 2046, 10000); VOLK_RUN_TESTS(volk_32fc_x2_conjugate_dot_prod_32fc_a16, 1e-4, 0, 2046, 10000); + VOLK_RUN_TESTS(volk_32fc_x2_conjugate_dot_prod_32fc_u, 1e-4, 0, 2046, 10000); VOLK_RUN_TESTS(volk_32fc_deinterleave_32f_x2_a16, 1e-4, 0, 2046, 10000); VOLK_RUN_TESTS(volk_32fc_deinterleave_64f_x2_a16, 1e-4, 0, 2046, 10000); VOLK_RUN_TESTS(volk_32fc_s32f_deinterleave_real_16i_a16, 0, 32768, 2046, 10000); |