From fd03c0ee7cb9af71a5e0292569b626ba3dabd885 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Tue, 15 Feb 2011 21:59:19 -0800 Subject: Moved the fn indices gen from volk.c to volk_registry.h so the qa code has access to the static stuff --- volk/lib/qa_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'volk/lib/qa_utils.h') diff --git a/volk/lib/qa_utils.h b/volk/lib/qa_utils.h index e2539060a..503beb419 100644 --- a/volk/lib/qa_utils.h +++ b/volk/lib/qa_utils.h @@ -18,9 +18,9 @@ volk_type_t volk_type_from_string(std::string); float uniform(void); void random_floats(float *buf, unsigned n); -bool run_volk_tests(const int[], void(*)(), std::string, float, float, int, int); +bool run_volk_tests(const char **, const int[], void(*)(), std::string, float, float, int, int); -#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_CHECK_EQUAL(run_volk_tests(func##_arch_defs, (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0) +#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_CHECK_EQUAL(run_volk_tests(func##_indices, func##_arch_defs, (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0) typedef void (*volk_fn_1arg)(void *, unsigned int, const char*); //one input, operate in place typedef void (*volk_fn_2arg)(void *, void *, unsigned int, const char*); -- cgit From 668da8bd8874ae71a819d55f046e39c964a4270b Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Sat, 16 Apr 2011 10:47:10 -0700 Subject: Volk: manual funcs implemented, QA code runs. Barfs due to missing Orc arch. --- volk/lib/qa_utils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'volk/lib/qa_utils.h') diff --git a/volk/lib/qa_utils.h b/volk/lib/qa_utils.h index ed1ab373b..5103589cc 100644 --- a/volk/lib/qa_utils.h +++ b/volk/lib/qa_utils.h @@ -3,6 +3,8 @@ #include #include +#include +#include struct volk_type_t { bool is_float; @@ -18,9 +20,9 @@ volk_type_t volk_type_from_string(std::string); float uniform(void); void random_floats(float *buf, unsigned n); -bool run_volk_tests(const char **, const int[], void(*)(), std::string, float, float, int, int); +bool run_volk_tests(struct volk_func_desc, void(*)(), std::string, float, float, int, int); -#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_CHECK_EQUAL(run_volk_tests(func##_indices, func##_arch_defs, (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0) +#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_CHECK_EQUAL(run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0) typedef void (*volk_fn_1arg)(void *, unsigned int, const char*); //one input, operate in place typedef void (*volk_fn_2arg)(void *, void *, unsigned int, const char*); -- cgit From 52b4aee1bde356f05bb017536968a8ec77e3878b Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Mon, 9 May 2011 18:44:08 -0700 Subject: Volk: Each QA test runs in separate Boost test case so it prints statistics for you. --- volk/lib/qa_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'volk/lib/qa_utils.h') diff --git a/volk/lib/qa_utils.h b/volk/lib/qa_utils.h index 5103589cc..304a00533 100644 --- a/volk/lib/qa_utils.h +++ b/volk/lib/qa_utils.h @@ -22,7 +22,7 @@ void random_floats(float *buf, unsigned n); bool run_volk_tests(struct volk_func_desc, void(*)(), std::string, float, float, int, int); -#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_CHECK_EQUAL(run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0) +#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_AUTO_TEST_CASE(func##_test) { BOOST_CHECK_EQUAL(run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0); } typedef void (*volk_fn_1arg)(void *, unsigned int, const char*); //one input, operate in place typedef void (*volk_fn_2arg)(void *, void *, unsigned int, const char*); -- cgit From e3997ada93a25569a05bbfd615d73d00cee6eca5 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Tue, 10 May 2011 21:52:23 -0700 Subject: Volk: initial profiling support. Profiling works, reading doesn't yet. Need to add name field to volk arch_defs --- volk/lib/qa_utils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'volk/lib/qa_utils.h') diff --git a/volk/lib/qa_utils.h b/volk/lib/qa_utils.h index 304a00533..a1bc1f20c 100644 --- a/volk/lib/qa_utils.h +++ b/volk/lib/qa_utils.h @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -20,10 +21,10 @@ volk_type_t volk_type_from_string(std::string); float uniform(void); void random_floats(float *buf, unsigned n); -bool run_volk_tests(struct volk_func_desc, void(*)(), std::string, float, float, int, int); - -#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_AUTO_TEST_CASE(func##_test) { BOOST_CHECK_EQUAL(run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter), 0); } +bool run_volk_tests(struct volk_func_desc, void(*)(), std::string, float, float, int, int, std::vector *); +#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) BOOST_AUTO_TEST_CASE(func##_test) { BOOST_CHECK_EQUAL(run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter, 0), 0); } +#define VOLK_PROFILE(func, tol, scalar, len, iter, results) run_volk_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), tol, scalar, len, iter, results) typedef void (*volk_fn_1arg)(void *, unsigned int, const char*); //one input, operate in place typedef void (*volk_fn_2arg)(void *, void *, unsigned int, const char*); typedef void (*volk_fn_3arg)(void *, void *, void *, unsigned int, const char*); -- cgit