GNU Radio Manual and C++ API Reference  3.7.7
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
kernel_tests.h
Go to the documentation of this file.
1 #include "qa_utils.h"
2 
3 #include <volk/volk.h>
4 
5 #include <boost/assign/list_of.hpp>
6 #include <vector>
7 
8 // macros for initializing volk_test_case_t. Maccros are needed to generate
9 // function names of the pattern kernel_name_*
10 
11 // for puppets we need to get all the func_variants for the puppet and just
12 // keep track of the actual function name to write to results
13 #define VOLK_INIT_PUPP(func, puppet_master_func, test_params)\
14  volk_test_case_t(func##_get_func_desc(), (void(*)())func##_manual, std::string(#func),\
15  std::string(#puppet_master_func), test_params)
16 
17 #define VOLK_INIT_TEST(func, test_params)\
18  volk_test_case_t(func##_get_func_desc(), (void(*)())func##_manual, std::string(#func),\
19  test_params)
20 
21 std::vector<volk_test_case_t> init_test_list(volk_test_params_t test_params)
22 {
23 
24  // Some kernels need a lower tolerance
25  volk_test_params_t test_params_inacc = volk_test_params_t(1e-3, test_params.scalar(),
26  test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex());
27 
28  std::vector<volk_test_case_t> test_cases = boost::assign::list_of
30 
33  (VOLK_INIT_PUPP(volk_32u_popcntpuppet_32u, volk_32u_popcnt_32u, test_params))
36  (VOLK_INIT_PUPP(volk_8u_conv_k7_r2puppet_8u, volk_8u_x4_conv_k7_r2_8u, volk_test_params_t(0, test_params.scalar(), test_params.vlen(), test_params.iter()/10, test_params.benchmark_mode(), test_params.kernel_regex())))
46  (VOLK_INIT_TEST(volk_16i_convert_8i, test_params))
47  (VOLK_INIT_TEST(volk_16i_32fc_dot_prod_32fc, test_params_inacc))
48  (VOLK_INIT_TEST(volk_32f_accumulator_s32f, test_params_inacc))
49  (VOLK_INIT_TEST(volk_32f_x2_add_32f, test_params))
51  (VOLK_INIT_TEST(volk_32f_log2_32f, volk_test_params_t(3, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
52  (VOLK_INIT_TEST(volk_32f_expfast_32f, volk_test_params_t(1e-1, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
53  (VOLK_INIT_TEST(volk_32f_x2_pow_32f, volk_test_params_t(1e-2, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
54  (VOLK_INIT_TEST(volk_32f_sin_32f, test_params))
55  (VOLK_INIT_TEST(volk_32f_cos_32f, test_params))
56  (VOLK_INIT_TEST(volk_32f_tan_32f, test_params))
57  (VOLK_INIT_TEST(volk_32f_atan_32f, test_params_inacc))
58  (VOLK_INIT_TEST(volk_32f_asin_32f, test_params_inacc))
59  (VOLK_INIT_TEST(volk_32f_acos_32f, test_params_inacc))
70  (VOLK_INIT_TEST(volk_32fc_x2_dot_prod_32fc, test_params_inacc))
71  (VOLK_INIT_TEST(volk_32fc_32f_dot_prod_32fc, test_params_inacc))
72  (VOLK_INIT_TEST(volk_32fc_index_max_16u, volk_test_params_t(3, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
80  (VOLK_INIT_TEST(volk_32f_s32f_convert_32i, volk_test_params_t(1, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
81  (VOLK_INIT_TEST(volk_32f_convert_64f, test_params))
82  (VOLK_INIT_TEST(volk_32f_s32f_convert_8i, volk_test_params_t(1, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
87  (VOLK_INIT_TEST(volk_32f_x2_dot_prod_32f, test_params_inacc))
88  (VOLK_INIT_TEST(volk_32f_x2_s32f_interleave_16ic, volk_test_params_t(1, test_params.scalar(), test_params.vlen(), test_params.iter(), test_params.benchmark_mode(), test_params.kernel_regex())))
90  (VOLK_INIT_TEST(volk_32f_x2_max_32f, test_params))
91  (VOLK_INIT_TEST(volk_32f_x2_min_32f, test_params))
95  (VOLK_INIT_TEST(volk_32f_sqrt_32f, test_params))
96  (VOLK_INIT_TEST(volk_32f_s32f_stddev_32f, test_params_inacc))
99  (VOLK_INIT_TEST(volk_32f_x3_sum_of_poly_32f, test_params_inacc))
100  (VOLK_INIT_TEST(volk_32i_x2_and_32i, test_params))
102  (VOLK_INIT_TEST(volk_32i_x2_or_32i, test_params))
104  (VOLK_INIT_TEST(volk_64f_convert_32f, test_params))
105  (VOLK_INIT_TEST(volk_64f_x2_max_64f, test_params))
106  (VOLK_INIT_TEST(volk_64f_x2_min_64f, test_params))
114  (VOLK_INIT_TEST(volk_8i_convert_16i, test_params))
120  (VOLK_INIT_TEST(volk_32f_tanh_32f, test_params))
121  // no one uses these, so don't test them
122  //VOLK_PROFILE(volk_16i_x5_add_quad_16i_x4, 1e-4, 2046, 10000, &results, benchmark_mode, kernel_regex);
123  //VOLK_PROFILE(volk_16i_branch_4_state_8, 1e-4, 2046, 10000, &results, benchmark_mode, kernel_regex);
124  //VOLK_PROFILE(volk_16i_max_star_16i, 0, 0, 204602, 10000, &results, benchmark_mode, kernel_regex);
125  //VOLK_PROFILE(volk_16i_max_star_horizontal_16i, 0, 0, 204602, 10000, &results, benchmark_mode, kernel_regex);
126  //VOLK_PROFILE(volk_16i_permute_and_scalar_add, 1e-4, 0, 2046, 10000, &results, benchmark_mode, kernel_regex);
127  //VOLK_PROFILE(volk_16i_x4_quad_max_star_16i, 1e-4, 0, 2046, 10000, &results, benchmark_mode, kernel_regex);
128  // we need a puppet for this one
129  //(VOLK_INIT_TEST(volk_32fc_s32f_x2_power_spectral_density_32f, test_params))
130 
131  ;
132 
133 
134  return test_cases;
135 }
VOLK_API p_16ic_s32f_deinterleave_real_32f volk_16ic_s32f_deinterleave_real_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_pow_32f volk_32f_x2_pow_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_32f_multiply_32fc volk_32fc_32f_multiply_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_s32f_magnitude_32f volk_16ic_s32f_magnitude_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_magnitude_32f volk_32fc_magnitude_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_expfast_32f volk_32f_expfast_32f
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_s32f_deinterleave_real_32f volk_8ic_s32f_deinterleave_real_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_s32f_interleave_16ic volk_32f_x2_s32f_interleave_16ic
A function pointer to the dispatcher implementation.
VOLK_API p_16i_convert_8i volk_16i_convert_8i
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32f_power_spectrum_32f volk_32fc_s32f_power_spectrum_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_x2_dot_prod_32fc volk_32fc_x2_dot_prod_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_x2_s32f_square_dist_scalar_mult_32f volk_32fc_x2_s32f_square_dist_scalar_mult_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32i_s32f_convert_32f volk_32i_s32f_convert_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_atan_32f volk_32f_atan_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32i_x2_and_32i volk_32i_x2_and_32i
A function pointer to the dispatcher implementation.
VOLK_API p_16i_32fc_dot_prod_32fc volk_16i_32fc_dot_prod_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32fc_multiply_32fc volk_32fc_s32fc_multiply_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_index_max_16u volk_32fc_index_max_16u
A function pointer to the dispatcher implementation.
VOLK_API p_8i_s32f_convert_32f volk_8i_s32f_convert_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_convert_8i volk_32f_s32f_convert_8i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_tan_32f volk_32f_tan_32f
A function pointer to the dispatcher implementation.
VOLK_API p_64f_x2_max_64f volk_64f_x2_max_64f
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_magnitude_16i volk_16ic_magnitude_16i
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_s32f_deinterleave_32f_x2 volk_8ic_s32f_deinterleave_32f_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32f_asin_32f volk_32f_asin_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_deinterleave_64f_x2 volk_32fc_deinterleave_64f_x2
A function pointer to the dispatcher implementation.
VOLK_API p_64u_byteswappuppet_64u volk_64u_byteswappuppet_64u
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_x2_s32f_multiply_conjugate_32fc volk_8ic_x2_s32f_multiply_conjugate_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_conjugate_32fc volk_32fc_conjugate_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_32f_fm_detect_32f volk_32f_s32f_32f_fm_detect_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_dot_prod_16i volk_32f_x2_dot_prod_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_binary_slicer_32i volk_32f_binary_slicer_32i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_acos_32f volk_32f_acos_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x3_sum_of_poly_32f volk_32f_x3_sum_of_poly_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_32f_dot_prod_32fc volk_32fc_32f_dot_prod_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_8u_x4_conv_k7_r2_8u volk_8u_x4_conv_k7_r2_8u
A function pointer to the dispatcher implementation.
VOLK_API p_16i_s32f_convert_32f volk_16i_s32f_convert_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_subtract_32f volk_32f_x2_subtract_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_stddev_32f volk_32f_s32f_stddev_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_deinterleave_real_64f volk_32fc_deinterleave_real_64f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_convert_32i volk_32f_s32f_convert_32i
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_x2_conjugate_dot_prod_32fc volk_32fc_x2_conjugate_dot_prod_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_power_32f volk_32f_s32f_power_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_convert_16i volk_32f_s32f_convert_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32i_x2_or_32i volk_32i_x2_or_32i
A function pointer to the dispatcher implementation.
VOLK_API p_16u_byteswappuppet_16u volk_16u_byteswappuppet_16u
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_x2_square_dist_32f volk_32fc_x2_square_dist_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_sin_32f volk_32f_sin_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32f_magnitude_16i volk_32fc_s32f_magnitude_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_stddev_and_mean_32f_x2 volk_32f_stddev_and_mean_32f_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32fc_x2_rotator_32fc volk_32fc_s32fc_x2_rotator_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_64f_x2_min_64f volk_64f_x2_min_64f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_multiply_32f volk_32f_s32f_multiply_32f
A function pointer to the dispatcher implementation.
#define VOLK_INIT_PUPP(func, puppet_master_func, test_params)
Definition: kernel_tests.h:13
VOLK_API p_32fc_x2_multiply_32fc volk_32fc_x2_multiply_32fc
A function pointer to the dispatcher implementation.
std::vector< volk_test_case_t > init_test_list(volk_test_params_t test_params)
Definition: kernel_tests.h:21
VOLK_API p_32u_popcntpuppet_32u volk_32u_popcntpuppet_32u
A function pointer to the dispatcher implementation.
VOLK_API p_32f_tanh_32f volk_32f_tanh_32f
A function pointer to the dispatcher implementation.
VOLK_API p_64u_popcntpuppet_64u volk_64u_popcntpuppet_64u
A function pointer to the dispatcher implementation.
VOLK_API p_32f_sqrt_32f volk_32f_sqrt_32f
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_x2_multiply_conjugate_16ic volk_8ic_x2_multiply_conjugate_16ic
A function pointer to the dispatcher implementation.
VOLK_API p_64u_byteswap volk_64u_byteswap
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_interleave_32fc volk_32f_x2_interleave_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32f_accumulator_s32f volk_32f_accumulator_s32f
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_deinterleave_real_16i volk_8ic_deinterleave_real_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32u_byteswap volk_32u_byteswap
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32f_deinterleave_real_16i volk_32fc_s32f_deinterleave_real_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_divide_32f volk_32f_x2_divide_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_max_32f volk_32f_x2_max_32f
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_deinterleave_16i_x2 volk_16ic_deinterleave_16i_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_min_32f volk_32f_x2_min_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32f_atan2_32f volk_32fc_s32f_atan2_32f
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_deinterleave_real_8i volk_8ic_deinterleave_real_8i
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_magnitude_squared_32f volk_32fc_magnitude_squared_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_cos_32f volk_32f_cos_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32f_log2_32f volk_32f_log2_32f
A function pointer to the dispatcher implementation.
VOLK_API p_8u_conv_k7_r2puppet_8u volk_8u_conv_k7_r2puppet_8u
A function pointer to the dispatcher implementation.
VOLK_API p_8ic_deinterleave_16i_x2 volk_8ic_deinterleave_16i_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32fc_rotatorpuppet_32fc volk_32fc_s32fc_rotatorpuppet_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_dot_prod_32f volk_32f_x2_dot_prod_32f
A function pointer to the dispatcher implementation.
VOLK_API p_8i_convert_16i volk_8i_convert_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_binary_slicer_8i volk_32f_binary_slicer_8i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_s32f_calc_spectral_noise_floor_32f volk_32f_s32f_calc_spectral_noise_floor_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_s32f_power_32fc volk_32fc_s32f_power_32fc
A function pointer to the dispatcher implementation.
#define VOLK_INIT_TEST(func, test_params)
Definition: kernel_tests.h:17
VOLK_API p_32f_s32f_normalize volk_32f_s32f_normalize
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_deinterleave_real_32f volk_32fc_deinterleave_real_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32u_byteswappuppet_32u volk_32u_byteswappuppet_32u
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_multiply_32f volk_32f_x2_multiply_32f
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_deinterleave_real_16i volk_16ic_deinterleave_real_16i
A function pointer to the dispatcher implementation.
VOLK_API p_32f_convert_64f volk_32f_convert_64f
A function pointer to the dispatcher implementation.
VOLK_API p_64u_popcnt volk_64u_popcnt
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_s32f_deinterleave_32f_x2 volk_16ic_s32f_deinterleave_32f_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_deinterleave_imag_32f volk_32fc_deinterleave_imag_32f
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_x2_multiply_conjugate_32fc volk_32fc_x2_multiply_conjugate_32fc
A function pointer to the dispatcher implementation.
VOLK_API p_32fc_deinterleave_32f_x2 volk_32fc_deinterleave_32f_x2
A function pointer to the dispatcher implementation.
VOLK_API p_32f_x2_add_32f volk_32f_x2_add_32f
A function pointer to the dispatcher implementation.
VOLK_API p_64f_convert_32f volk_64f_convert_32f
A function pointer to the dispatcher implementation.
VOLK_API p_16ic_deinterleave_real_8i volk_16ic_deinterleave_real_8i
A function pointer to the dispatcher implementation.
VOLK_API p_16u_byteswap volk_16u_byteswap
A function pointer to the dispatcher implementation.