From 6f814f04c4af020a627f6772f7f9b14083d312f4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 12 Jan 2011 15:41:32 -0800 Subject: 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 --- host/include/uhd/convert.hpp | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/convert.hpp b/host/include/uhd/convert.hpp index 488cba98e..bfe8c8267 100644 --- a/host/include/uhd/convert.hpp +++ b/host/include/uhd/convert.hpp @@ -58,37 +58,31 @@ namespace uhd{ namespace convert{ ); /*! - * Convert IO samples to OWT samples: - * + * Get a converter function that converts cpu to otw. * \param io_type the type of the input samples * \param otw_type the type of the output samples - * \param input_buffs input buffers to read samples - * \param output_buffs output buffers to write samples - * \param nsamps_per_io_buff samples per IO buffer + * \param num_input_buffs the number of inputs + * \param num_output_buffs the number of outputs */ - UHD_API void io_type_to_otw_type( + UHD_API const function_type &get_converter_cpu_to_otw( const io_type_t &io_type, const otw_type_t &otw_type, - input_type &input_buffs, - output_type &output_buffs, - size_t nsamps_per_io_buff + size_t num_input_buffs, + size_t num_output_buffs ); /*! - * Convert OTW samples to IO samples: - * - * \param io_type the type of the output samples - * \param otw_type the type of the input samples - * \param input_buffs input buffers to read samples - * \param output_buffs output buffers to write samples - * \param nsamps_per_io_buff samples per IO buffer + * Get a converter function that converts otw to cpu. + * \param io_type the type of the input samples + * \param otw_type the type of the output samples + * \param num_input_buffs the number of inputs + * \param num_output_buffs the number of outputs */ - UHD_API void otw_type_to_io_type( + UHD_API const function_type &get_converter_otw_to_cpu( const io_type_t &io_type, const otw_type_t &otw_type, - input_type &input_buffs, - output_type &output_buffs, - size_t nsamps_per_io_buff + size_t num_input_buffs, + size_t num_output_buffs ); }} //namespace -- cgit v1.2.3