diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-12 15:41:32 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-12 15:41:32 -0800 |
commit | 6f814f04c4af020a627f6772f7f9b14083d312f4 (patch) | |
tree | 586e9d103371d3840cc19477c323e37bfa8da086 /host/test | |
parent | 4f28afe2479856f1e0696983a206f05939b2edbf (diff) | |
download | uhd-6f814f04c4af020a627f6772f7f9b14083d312f4.tar.gz uhd-6f814f04c4af020a627f6772f7f9b14083d312f4.tar.bz2 uhd-6f814f04c4af020a627f6772f7f9b14083d312f4.zip |
uhd: changed convert routines to return the function pointer
changed the vrt packet handler to get the function pointer (once), this may be a minor performance help
Diffstat (limited to 'host/test')
-rw-r--r-- | host/test/convert_test.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/host/test/convert_test.cpp b/host/test/convert_test.cpp index ca1f039aa..5f2aaf3d1 100644 --- a/host/test/convert_test.cpp +++ b/host/test/convert_test.cpp @@ -52,14 +52,14 @@ template <typename Range> static void loopback( convert::output_type output0(1, &interm[0]), output1(1, &output[0]); //convert to intermediate type - convert::io_type_to_otw_type( - io_type, otw_type, input0, output0, nsamps - ); + convert::get_converter_cpu_to_otw( + io_type, otw_type, input0.size(), output0.size() + )(input0, output0, nsamps); //convert back to host type - convert::otw_type_to_io_type( - io_type, otw_type, input1, output1, nsamps - ); + convert::get_converter_otw_to_cpu( + io_type, otw_type, input1.size(), output1.size() + )(input1, output1, nsamps); } /*********************************************************************** @@ -177,14 +177,14 @@ BOOST_AUTO_TEST_CASE(test_convert_types_fc32_to_sc16){ convert::output_type output0(1, &interm[0]), output1(1, &output[0]); //convert float to intermediate - convert::io_type_to_otw_type( - io_type_in, otw_type, input0, output0, nsamps - ); + convert::get_converter_cpu_to_otw( + io_type_in, otw_type, input0.size(), output0.size() + )(input0, output0, nsamps); //convert intermediate to short - convert::otw_type_to_io_type( - io_type_out, otw_type, input1, output1, nsamps - ); + convert::get_converter_otw_to_cpu( + io_type_out, otw_type, input1.size(), output1.size() + )(input1, output1, nsamps); //test that the inputs and outputs match for (size_t i = 0; i < nsamps; i++){ @@ -217,14 +217,14 @@ BOOST_AUTO_TEST_CASE(test_convert_types_sc16_to_fc32){ convert::output_type output0(1, &interm[0]), output1(1, &output[0]); //convert short to intermediate - convert::io_type_to_otw_type( - io_type_in, otw_type, input0, output0, nsamps - ); + convert::get_converter_cpu_to_otw( + io_type_in, otw_type, input0.size(), output0.size() + )(input0, output0, nsamps); //convert intermediate to float - convert::otw_type_to_io_type( - io_type_out, otw_type, input1, output1, nsamps - ); + convert::get_converter_otw_to_cpu( + io_type_out, otw_type, input1.size(), output1.size() + )(input1, output1, nsamps); //test that the inputs and outputs match for (size_t i = 0; i < nsamps; i++){ |