From fb7e8a09a58f4c08f70ba0e088710a0e011ea01d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 9 Feb 2011 19:01:28 -0800 Subject: uhd: replaced std::vector for buffer arguments in send/recv Created new type ref_vector for representing a vector of pointers. Can be created from std::vector or a pointer. Removes the convenience constrcutors for send/recv, its not needed. Removes malloc/free overhead when using send/recv with pointer. --- host/lib/usrp/usrp2/io_impl.cpp | 4 ++-- host/lib/usrp/usrp2/usrp2_impl.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/usrp2') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 56c20934b..0376ebdae 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -297,7 +297,7 @@ size_t usrp2_impl::get_max_send_samps_per_packet(void) const{ } size_t usrp2_impl::send( - const std::vector &buffs, size_t num_samps, + const send_buffs_type &buffs, size_t num_samps, const tx_metadata_t &metadata, const io_type_t &io_type, send_mode_t send_mode, double timeout ){ @@ -459,7 +459,7 @@ static void handle_overflow(std::vector &mboards, size_ } size_t usrp2_impl::recv( - const std::vector &buffs, size_t num_samps, + const recv_buffs_type &buffs, size_t num_samps, rx_metadata_t &metadata, const io_type_t &io_type, recv_mode_t recv_mode, double timeout ){ diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index ad95b2a4a..337f842d6 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -200,12 +200,12 @@ public: //the io interface size_t send( - const std::vector &, size_t, + const send_buffs_type &, size_t, const uhd::tx_metadata_t &, const uhd::io_type_t &, uhd::device::send_mode_t, double ); size_t recv( - const std::vector &, size_t, + const recv_buffs_type &, size_t, uhd::rx_metadata_t &, const uhd::io_type_t &, uhd::device::recv_mode_t, double ); -- cgit v1.2.3