Skip to content

Commit

Permalink
qa: Update QA code to new interface
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jdemel committed Sep 5, 2021
1 parent fcef50a commit 7b40395
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/kernel_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ std::vector<volk_test_case_t> 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<volk_test_case_t> test_cases;
Expand Down
6 changes: 3 additions & 3 deletions lib/qa_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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]);
Expand All @@ -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]);
Expand Down

0 comments on commit 7b40395

Please sign in to comment.