From 7b403956a6afb7050a0700044dfb98005e02a3d3 Mon Sep 17 00:00:00 2001 From: Johannes Demel Date: Sun, 5 Sep 2021 14:29:51 +0200 Subject: [PATCH] qa: Update QA code to new interface With this commit, our QA code should work again. However, it still relies on C types in the C++ domain. We probably want to add a C++ wrapper around C VOLK. The idea: - add `volk.hh` - Include C++ magic in here. - Find idiomatic, modern C++ interface defition. --- lib/kernel_tests.h | 3 ++- lib/qa_utils.cc | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/kernel_tests.h b/lib/kernel_tests.h index 6df83abb2..4122cd7e0 100644 --- a/lib/kernel_tests.h +++ b/lib/kernel_tests.h @@ -33,7 +33,8 @@ std::vector init_test_list(volk_test_params_t test_params) test_params_power.set_scalar(2.5); volk_test_params_t test_params_rotator(test_params); - test_params_rotator.set_scalar(std::polar(1.0f, 0.1f)); + auto rotator_value = std::polar(1.0f, 0.1f); + test_params_rotator.set_scalar(lv_32fc_t{rotator_value.real(), rotator_value.imag()}); test_params_rotator.set_tol(1e-3); std::vector test_cases; diff --git a/lib/qa_utils.cc b/lib/qa_utils.cc index 1dcee6e0b..7e16941e9 100644 --- a/lib/qa_utils.cc +++ b/lib/qa_utils.cc @@ -627,7 +627,7 @@ bool run_volk_tests(volk_func_desc_t desc, } else { run_cast_test1_s32f((volk_fn_1arg_s32f)(manual_func), test_data[i], - scalar.real(), + __real__ scalar, vlen, iter, arch_list[i]); @@ -650,7 +650,7 @@ bool run_volk_tests(volk_func_desc_t desc, } else { run_cast_test2_s32f((volk_fn_2arg_s32f)(manual_func), test_data[i], - scalar.real(), + __real__ scalar, vlen, iter, arch_list[i]); @@ -673,7 +673,7 @@ bool run_volk_tests(volk_func_desc_t desc, } else { run_cast_test3_s32f((volk_fn_3arg_s32f)(manual_func), test_data[i], - scalar.real(), + __real__ scalar, vlen, iter, arch_list[i]);