diff options
author | Josh Blum | 2013-01-13 13:51:46 -0800 |
---|---|---|
committer | Josh Blum | 2013-01-13 15:23:48 -0800 |
commit | e826097e09fdfb04d14bf87861646b88229db881 (patch) | |
tree | 38d4f3e09cfbcedcbfc4ed6a18c0aafa4121dd9c /volk/lib/qa_utils.cc | |
parent | 3abf4a11534d0db96e32830f629c8e34a8098798 (diff) | |
download | gnuradio-e826097e09fdfb04d14bf87861646b88229db881.tar.gz gnuradio-e826097e09fdfb04d14bf87861646b88229db881.tar.bz2 gnuradio-e826097e09fdfb04d14bf87861646b88229db881.zip |
gras: support changeset for 3.6.4
used volk from next branch cf5c930d89ac89ba5a0da4a616c88d3c37e018ae for grextras support (it uses the dispatcher)
empty stubs for the gr_basic_block msg passing. This is going to be difficult to figure out. The alias stuff may or may not be related
most qa pass, there seems to be some additional issues, will be working through them on futher commits
Conflicts:
gnuradio-core/CMakeLists.txt
gnuradio-core/src/lib/runtime/CMakeLists.txt
gnuradio-core/src/lib/runtime/gr_block.cc
gnuradio-core/src/lib/runtime/gr_block.h
gnuradio-core/src/lib/runtime/gr_hier_block2.h
gnuradio-core/src/lib/runtime/gr_top_block.h
gnuradio-core/src/python/gnuradio/gr/__init__.py
gr-audio/examples/c++/CMakeLists.txt
gr-fcd/examples/c++/CMakeLists.txt
grc/python/Port.py
Diffstat (limited to 'volk/lib/qa_utils.cc')
-rw-r--r-- | volk/lib/qa_utils.cc | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/volk/lib/qa_utils.cc b/volk/lib/qa_utils.cc index 4e361aece..e526eb2d0 100644 --- a/volk/lib/qa_utils.cc +++ b/volk/lib/qa_utils.cc @@ -63,12 +63,12 @@ void load_random_data(void *data, volk_type_t type, unsigned int n) { } } -static std::vector<std::string> get_arch_list(struct volk_func_desc desc) { +static std::vector<std::string> get_arch_list(volk_func_desc_t desc) { std::vector<std::string> archlist; - for(int i = 0; i < desc.n_archs; i++) { + for(size_t i = 0; i < desc.n_impls; i++) { //if(!(archs[i+1] & volk_get_lvarch())) continue; //this arch isn't available on this pc - archlist.push_back(std::string(desc.indices[i])); + archlist.push_back(std::string(desc.impl_names[i])); } return archlist; @@ -256,7 +256,7 @@ public: private: std::list<std::vector<char> > _mems; }; -bool run_volk_tests(struct volk_func_desc desc, +bool run_volk_tests(volk_func_desc_t desc, void (*manual_func)(), std::string name, float tol, @@ -442,22 +442,32 @@ bool run_volk_tests(struct volk_func_desc desc, arch_results.push_back(!fail); } - double best_time = std::numeric_limits<double>::max(); - std::string best_arch = "generic"; - for(size_t i=0; i < arch_list.size(); i++) { - if((profile_times[i] < best_time) && arch_results[i]) { - best_time = profile_times[i]; - best_arch = arch_list[i]; + double best_time_a = std::numeric_limits<double>::max(); + double best_time_u = std::numeric_limits<double>::max(); + std::string best_arch_a = "generic"; + std::string best_arch_u = "generic"; + for(size_t i=0; i < arch_list.size(); i++) + { + if((profile_times[i] < best_time_u) && arch_results[i] && desc.impl_alignment[i] == 0) + { + best_time_u = profile_times[i]; + best_arch_u = arch_list[i]; + } + if((profile_times[i] < best_time_a) && arch_results[i]) + { + best_time_a = profile_times[i]; + best_arch_a = arch_list[i]; } } - std::cout << "Best arch: " << best_arch << std::endl; + std::cout << "Best aligned arch: " << best_arch_a << std::endl; + std::cout << "Best unaligned arch: " << best_arch_u << std::endl; if(best_arch_vector) { if(puppet_master_name == "NULL") { - best_arch_vector->push_back(name + std::string(" ") + best_arch); + best_arch_vector->push_back(name + " " + best_arch_a + " " + best_arch_u); } else { - best_arch_vector->push_back(puppet_master_name + std::string(" ") + best_arch); + best_arch_vector->push_back(puppet_master_name + " " + best_arch_a + " " + best_arch_u); } } |