aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/xport_benchmarker.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/transport/xport_benchmarker.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/transport/xport_benchmarker.cpp')
-rw-r--r--host/lib/transport/xport_benchmarker.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/host/lib/transport/xport_benchmarker.cpp b/host/lib/transport/xport_benchmarker.cpp
index d58dbea47..d8f533edc 100644
--- a/host/lib/transport/xport_benchmarker.cpp
+++ b/host/lib/transport/xport_benchmarker.cpp
@@ -23,9 +23,9 @@ const device_addr_t& xport_benchmarker::benchmark_throughput_chdr
(
zero_copy_if::sptr tx_transport,
zero_copy_if::sptr rx_transport,
- boost::uint32_t sid,
+ uint32_t sid,
bool big_endian,
- boost::uint32_t duration_ms)
+ uint32_t duration_ms)
{
vrt::if_packet_info_t pkt_info;
_initialize_chdr(tx_transport, rx_transport, sid, pkt_info);
@@ -45,8 +45,8 @@ const device_addr_t& xport_benchmarker::benchmark_throughput_chdr
boost::posix_time::ptime stop_time(boost::posix_time::microsec_clock::local_time());
double duration_s = ((double)(stop_time-start_time).total_microseconds())/1e6;
- boost::uint64_t tx_bytes = pkt_info.num_payload_words32*sizeof(uint32_t)*_num_tx_packets;
- boost::uint64_t rx_bytes = pkt_info.num_payload_words32*sizeof(uint32_t)*_num_rx_packets;
+ uint64_t tx_bytes = pkt_info.num_payload_words32*sizeof(uint32_t)*_num_tx_packets;
+ uint64_t rx_bytes = pkt_info.num_payload_words32*sizeof(uint32_t)*_num_rx_packets;
double tx_rate = (((double)tx_bytes)/duration_s);
double rx_rate = (((double)rx_bytes)/duration_s);
@@ -66,7 +66,7 @@ void xport_benchmarker::_stream_tx(zero_copy_if* transport, vrt::if_packet_info_
while (not boost::this_thread::interruption_requested()) {
managed_send_buffer::sptr buff = transport->get_send_buff(_tx_timeout);
if (buff) {
- boost::uint32_t *packet_buff = buff->cast<boost::uint32_t *>();
+ uint32_t *packet_buff = buff->cast<uint32_t *>();
//Populate packet
if (big_endian) {
vrt::if_hdr_pack_be(packet_buff, *pkt_info);
@@ -74,7 +74,7 @@ void xport_benchmarker::_stream_tx(zero_copy_if* transport, vrt::if_packet_info_
vrt::if_hdr_pack_le(packet_buff, *pkt_info);
}
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(pkt_info->num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(pkt_info->num_packet_words32));
_num_tx_packets++;
} else {
_num_tx_timeouts++;
@@ -90,8 +90,8 @@ void xport_benchmarker::_stream_rx(zero_copy_if* transport, const vrt::if_packet
//Extract packet info
vrt::if_packet_info_t pkt_info;
pkt_info.link_type = exp_pkt_info->link_type;
- pkt_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ pkt_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
_num_rx_packets++;
@@ -128,7 +128,7 @@ void xport_benchmarker::_reset_counters(void)
void xport_benchmarker::_initialize_chdr(
zero_copy_if::sptr tx_transport,
zero_copy_if::sptr rx_transport,
- boost::uint32_t sid,
+ uint32_t sid,
vrt::if_packet_info_t& pkt_info)
{
_tx_timeout = 0.5;
@@ -138,9 +138,9 @@ void xport_benchmarker::_initialize_chdr(
pkt_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
pkt_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_DATA;
- pkt_info.num_packet_words32 = (frame_size/sizeof(boost::uint32_t));
+ pkt_info.num_packet_words32 = (frame_size/sizeof(uint32_t));
pkt_info.num_payload_words32 = pkt_info.num_packet_words32 - 2;
- pkt_info.num_payload_bytes = pkt_info.num_payload_words32*sizeof(boost::uint32_t);
+ pkt_info.num_payload_bytes = pkt_info.num_payload_words32*sizeof(uint32_t);
pkt_info.packet_count = 0;
pkt_info.sob = false;
pkt_info.eob = false;