[PATCH 4/6] Fix flaky fm_detect test
authorClayton Smith <argilo@gmail.com>
Fri, 8 Dec 2023 23:57:02 +0000 (18:57 -0500)
committerA. Maitland Bottoms <bottoms@debian.org>
Sat, 16 Dec 2023 14:31:28 +0000 (09:31 -0500)
Signed-off-by: Clayton Smith <argilo@gmail.com>
Gbp-Pq: Name 0004-Fix-flaky-fm_detect-test.patch

kernels/volk/volk_32f_x2_fm_detectpuppet_32f.h
lib/kernel_tests.h

index e4196d52f6b9dc6e2900950880964fff3aa3f0f5..b49015433561415f7f52de38c63c3309db1a92db 100644 (file)
@@ -20,7 +20,7 @@ static inline void volk_32f_x2_fm_detectpuppet_32f_a_avx(float* outputVector,
                                                          float* saveValue,
                                                          unsigned int num_points)
 {
-    const float bound = 1.0f;
+    const float bound = 2.0f;
 
     volk_32f_s32f_32f_fm_detect_32f_a_avx(
         outputVector, inputVector, bound, saveValue, num_points);
@@ -35,7 +35,7 @@ static inline void volk_32f_x2_fm_detectpuppet_32f_a_sse(float* outputVector,
                                                          float* saveValue,
                                                          unsigned int num_points)
 {
-    const float bound = 1.0f;
+    const float bound = 2.0f;
 
     volk_32f_s32f_32f_fm_detect_32f_a_sse(
         outputVector, inputVector, bound, saveValue, num_points);
@@ -49,7 +49,7 @@ static inline void volk_32f_x2_fm_detectpuppet_32f_generic(float* outputVector,
                                                            float* saveValue,
                                                            unsigned int num_points)
 {
-    const float bound = 1.0f;
+    const float bound = 2.0f;
 
     volk_32f_s32f_32f_fm_detect_32f_generic(
         outputVector, inputVector, bound, saveValue, num_points);
@@ -73,7 +73,7 @@ static inline void volk_32f_x2_fm_detectpuppet_32f_u_avx(float* outputVector,
                                                          float* saveValue,
                                                          unsigned int num_points)
 {
-    const float bound = 1.0f;
+    const float bound = 2.0f;
 
     volk_32f_s32f_32f_fm_detect_32f_u_avx(
         outputVector, inputVector, bound, saveValue, num_points);
index ab85423e0b24118618674a2e8cdf2f16b1a62886..7d637e5bb72c0113be4aae4d7fac317e862ddfc1 100644 (file)
@@ -64,8 +64,9 @@ std::vector<volk_test_case_t> init_test_list(volk_test_params_t test_params)
                       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_PUPP(volk_32f_x2_fm_detectpuppet_32f,
+                      volk_32f_s32f_32f_fm_detect_32f,
+                      test_params.make_absolute(1e-6)))
     QA(VOLK_INIT_TEST(volk_16ic_s32f_deinterleave_real_32f, test_params))
     QA(VOLK_INIT_TEST(volk_16ic_deinterleave_real_8i, test_params))
     QA(VOLK_INIT_TEST(volk_16ic_deinterleave_16i_x2, test_params))