10 #ifndef VOLK_QA_UTILS_H
11 #define VOLK_QA_UTILS_H
14 #include <volk/volk.h>
50 std::map<std::string, volk_test_time_t>
results;
64 std::string _kernel_regex;
79 _absolute_mode(false),
87 void set_regex(std::string regex) { _kernel_regex = regex; };
89 float tol() {
return _tol; };
91 unsigned int vlen() {
return _vlen; };
92 unsigned int iter() {
return _iter; };
100 t._absolute_mode =
true;
115 void (*_kernel_ptr)();
118 std::string _puppet_master_name;
123 std::string
name() {
return _name; };
128 void (*t_kernel_ptr)(),
132 _kernel_ptr(t_kernel_ptr),
135 _puppet_master_name(
"NULL"){};
138 void (*t_kernel_ptr)(),
143 _kernel_ptr(t_kernel_ptr),
161 std::vector<volk_test_results_t>* results = NULL,
162 std::string puppet_master_name =
"NULL");
171 std::vector<volk_test_results_t>* results = NULL,
172 std::string puppet_master_name =
"NULL",
173 bool absolute_mode =
false,
174 bool benchmark_mode =
false);
176 #define VOLK_PROFILE(func, test_params, results) \
177 run_volk_tests(func##_get_func_desc(), \
178 (void (*)())func##_manual, \
179 std::string(#func), \
183 #define VOLK_PUPPET_PROFILE(func, puppet_master_func, test_params, results) \
184 run_volk_tests(func##_get_func_desc(), \
185 (void (*)())func##_manual, \
186 std::string(#func), \
189 std::string(#puppet_master_func))
197 void*, float,
unsigned int,
const char*);
207 void*,
void*,
void*,
lv_32fc_t,
unsigned int,
const char*);
Definition: qa_utils.h:112
volk_func_desc_t desc()
Definition: qa_utils.h:121
std::string puppet_master_name()
Definition: qa_utils.h:124
void(*)() kernel_ptr()
Definition: qa_utils.h:122
volk_test_params_t test_parameters()
Definition: qa_utils.h:125
volk_test_case_t(volk_func_desc_t desc, void(*t_kernel_ptr)(), std::string name, std::string puppet_master_name, volk_test_params_t test_parameters)
Definition: qa_utils.h:137
std::string name()
Definition: qa_utils.h:123
volk_test_case_t(volk_func_desc_t desc, void(*t_kernel_ptr)(), std::string name, volk_test_params_t test_parameters)
Definition: qa_utils.h:127
Definition: qa_utils.h:56
lv_32fc_t scalar()
Definition: qa_utils.h:90
unsigned int iter()
Definition: qa_utils.h:92
volk_test_params_t make_absolute(float tol)
Definition: qa_utils.h:96
volk_test_params_t make_tol(float tol)
Definition: qa_utils.h:103
unsigned int vlen()
Definition: qa_utils.h:91
void set_tol(float tol)
Definition: qa_utils.h:82
bool absolute_mode()
Definition: qa_utils.h:94
void set_iter(unsigned int iter)
Definition: qa_utils.h:85
void set_benchmark(bool benchmark)
Definition: qa_utils.h:86
void set_scalar(lv_32fc_t scalar)
Definition: qa_utils.h:83
void set_vlen(unsigned int vlen)
Definition: qa_utils.h:84
std::string kernel_regex()
Definition: qa_utils.h:95
volk_test_params_t(float tol, lv_32fc_t scalar, unsigned int vlen, unsigned int iter, bool benchmark_mode, std::string kernel_regex)
Definition: qa_utils.h:68
void set_regex(std::string regex)
Definition: qa_utils.h:87
float tol()
Definition: qa_utils.h:89
bool benchmark_mode()
Definition: qa_utils.h:93
Definition: qa_utils.h:44
std::string name
Definition: qa_utils.h:46
std::string config_name
Definition: qa_utils.h:47
unsigned int iter
Definition: qa_utils.h:49
std::map< std::string, volk_test_time_t > results
Definition: qa_utils.h:50
std::string best_arch_a
Definition: qa_utils.h:51
std::string best_arch_u
Definition: qa_utils.h:52
unsigned int vlen
Definition: qa_utils.h:48
Definition: qa_utils.h:35
double time
Definition: qa_utils.h:38
std::string name
Definition: qa_utils.h:37
std::string units
Definition: qa_utils.h:39
bool pass
Definition: qa_utils.h:40
volk_type_t volk_type_from_string(std::string)
Definition: qa_utils.cc:123
void(* volk_fn_1arg)(void *, unsigned int, const char *)
Definition: qa_utils.h:190
void(* volk_fn_3arg)(void *, void *, void *, unsigned int, const char *)
Definition: qa_utils.h:194
void(* volk_fn_3arg_s32fc)(void *, void *, void *, lv_32fc_t, unsigned int, const char *)
Definition: qa_utils.h:206
void(* volk_fn_2arg_s32f)(void *, void *, float, unsigned int, const char *)
Definition: qa_utils.h:198
void(* volk_fn_4arg)(void *, void *, void *, void *, unsigned int, const char *)
Definition: qa_utils.h:195
void(* volk_fn_2arg)(void *, void *, unsigned int, const char *)
Definition: qa_utils.h:193
void(* volk_fn_1arg_s32f)(void *, float, unsigned int, const char *)
Definition: qa_utils.h:196
void(* volk_fn_1arg_s32fc)(void *, lv_32fc_t, unsigned int, const char *)
Definition: qa_utils.h:200
bool run_volk_tests(volk_func_desc_t, void(*)(), std::string, volk_test_params_t, std::vector< volk_test_results_t > *results=NULL, std::string puppet_master_name="NULL")
Definition: qa_utils.cc:500
void(* volk_fn_3arg_s32f)(void *, void *, void *, float, unsigned int, const char *)
Definition: qa_utils.h:199
void(* volk_fn_2arg_s32fc)(void *, void *, lv_32fc_t, unsigned int, const char *)
Definition: qa_utils.h:205
void random_floats(float *buf, unsigned n)
Definition: qa_utils.h:25
bool is_signed
Definition: qa_utils.h:28
bool is_complex
Definition: qa_utils.h:29
bool is_scalar
Definition: qa_utils.h:27
std::string str
Definition: qa_utils.h:31
bool is_float
Definition: qa_utils.h:26
int size
Definition: qa_utils.h:30
__VOLK_DECL_BEGIN struct volk_func_desc volk_func_desc_t
Get description parameters for this kernel.
Definition: volk.tmpl.h:89
VOLK_API void
Call into a specific implementation given by name.
Definition: volk.tmpl.h:101
float complex lv_32fc_t
Definition: volk_complex.h:74