From 99c2730bc9db270560671f2d7d173768465ed51f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 31 Oct 2016 14:30:52 -0700 Subject: 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 , but not all of our compilers support that). --- host/lib/transport/xport_benchmarker.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'host/lib/transport/xport_benchmarker.cpp') 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(); + uint32_t *packet_buff = buff->cast(); //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(); + pkt_info.num_packet_words32 = buff->size()/sizeof(uint32_t); + const uint32_t *packet_buff = buff->cast(); _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; -- cgit v1.2.3