Use sensible scalars for rotator and power
authorClayton Smith <argilo@gmail.com>
Fri, 23 Aug 2019 11:17:24 +0000 (07:17 -0400)
committerA. Maitland Bottoms <bottoms@debian.org>
Fri, 15 Nov 2019 03:47:23 +0000 (03:47 +0000)
Gbp-Pq: Name 0003-Use-sensible-scalars-for-rotator-and-power.patch

lib/kernel_tests.h

index 9b29379964d543a41ecebd939b733b8c7d583547..72eb8501dcfe052dccea71b5e33e89043e8c46b0 100644 (file)
@@ -24,6 +24,13 @@ std::vector<volk_test_case_t> init_test_list(volk_test_params_t test_params)
     volk_test_params_t test_params_inacc = test_params.make_tol(1e-2);
     volk_test_params_t test_params_inacc_tenth = test_params.make_tol(1e-1);
 
+    volk_test_params_t test_params_power(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));
+    test_params_rotator.set_tol(1e-3);
+
     std::vector<volk_test_case_t> test_cases;
     QA(VOLK_INIT_PUPP(volk_64u_popcntpuppet_64u, volk_64u_popcnt,     test_params))
     QA(VOLK_INIT_PUPP(volk_64u_popcntpuppet_64u, volk_64u_popcnt,     test_params))
@@ -32,7 +39,7 @@ std::vector<volk_test_case_t> init_test_list(volk_test_params_t test_params)
     QA(VOLK_INIT_PUPP(volk_32u_byteswappuppet_32u, volk_32u_byteswap, test_params))
     QA(VOLK_INIT_PUPP(volk_32u_popcntpuppet_32u, volk_32u_popcnt_32u,  test_params))
     QA(VOLK_INIT_PUPP(volk_64u_byteswappuppet_64u, volk_64u_byteswap, test_params))
-    QA(VOLK_INIT_PUPP(volk_32fc_s32fc_rotatorpuppet_32fc, volk_32fc_s32fc_x2_rotator_32fc, test_params))
+    QA(VOLK_INIT_PUPP(volk_32fc_s32fc_rotatorpuppet_32fc, volk_32fc_s32fc_x2_rotator_32fc, test_params_rotator))
     QA(VOLK_INIT_PUPP(volk_8u_conv_k7_r2puppet_8u, volk_8u_x4_conv_k7_r2_8u, test_params.make_tol(0)))
     QA(VOLK_INIT_PUPP(volk_32f_x2_fm_detectpuppet_32f, volk_32f_s32f_32f_fm_detect_32f, test_params))
     QA(VOLK_INIT_TEST(volk_16ic_s32f_deinterleave_real_32f,           test_params))
@@ -63,7 +70,7 @@ std::vector<volk_test_case_t> init_test_list(volk_test_params_t test_params)
     QA(VOLK_INIT_TEST(volk_32f_atan_32f,                              test_params_inacc))
     QA(VOLK_INIT_TEST(volk_32f_asin_32f,                              test_params_inacc))
     QA(VOLK_INIT_TEST(volk_32f_acos_32f,                              test_params_inacc))
-    QA(VOLK_INIT_TEST(volk_32fc_s32f_power_32fc,                      test_params))
+    QA(VOLK_INIT_TEST(volk_32fc_s32f_power_32fc,                      test_params_power))
     QA(VOLK_INIT_TEST(volk_32f_s32f_calc_spectral_noise_floor_32f,    test_params_inacc))
     QA(VOLK_INIT_TEST(volk_32fc_s32f_atan2_32f,                       test_params))
     QA(VOLK_INIT_TEST(volk_32fc_x2_conjugate_dot_prod_32fc,           test_params_inacc_tenth))