summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-09 19:01:28 -0800
committerJosh Blum <josh@joshknows.com>2011-02-09 19:01:28 -0800
commitfb7e8a09a58f4c08f70ba0e088710a0e011ea01d (patch)
tree6a08b4b8751ba09263de160de89099573b97f69c /host/lib/usrp/usrp1
parent55884d630ca675c9f006eb0705bc8670119c4737 (diff)
downloaduhd-fb7e8a09a58f4c08f70ba0e088710a0e011ea01d.tar.gz
uhd-fb7e8a09a58f4c08f70ba0e088710a0e011ea01d.tar.bz2
uhd-fb7e8a09a58f4c08f70ba0e088710a0e011ea01d.zip
uhd: replaced std::vector<type> 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.
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp4
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 7953447d1..88cbab073 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -220,7 +220,7 @@ size_t usrp1_impl::get_max_send_samps_per_packet(void) const {
}
size_t usrp1_impl::send(
- const std::vector<const void *> &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
){
@@ -298,7 +298,7 @@ size_t usrp1_impl::get_max_recv_samps_per_packet(void) const {
}
size_t usrp1_impl::recv(
- const std::vector<void *> &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/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index 28199ebe3..1d9f6709f 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -80,13 +80,13 @@ public:
~usrp1_impl(void);
//the io interface
- size_t send(const std::vector<const void *> &,
+ size_t send(const send_buffs_type &,
size_t,
const uhd::tx_metadata_t &,
const uhd::io_type_t &,
send_mode_t, double);
- size_t recv(const std::vector<void *> &,
+ size_t recv(const recv_buffs_type &,
size_t, uhd::rx_metadata_t &,
const uhd::io_type_t &,
recv_mode_t, double);