From 1fe98e8701dd0b790b172762c3629db32956d1fc Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 11:18:57 +0200 Subject: uhd: Replace usage of boost smart pointers with C++11 counterparts This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include . Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct. --- host/lib/usrp/b100/b100_impl.hpp | 8 ++--- host/lib/usrp/b100/clock_ctrl.hpp | 4 +-- host/lib/usrp/b100/codec_ctrl.hpp | 4 +-- host/lib/usrp/b100/fifo_ctrl_excelsior.hpp | 4 +-- host/lib/usrp/b100/io_impl.cpp | 22 ++++++------ host/lib/usrp/b100/usb_zero_copy_wrapper.cpp | 10 +++--- host/lib/usrp/b200/b200_cores.hpp | 6 ++-- host/lib/usrp/b200/b200_iface.hpp | 4 +-- host/lib/usrp/b200/b200_impl.cpp | 11 +++--- host/lib/usrp/b200/b200_impl.hpp | 22 ++++++------ host/lib/usrp/b200/b200_io_impl.cpp | 40 +++++++++++----------- host/lib/usrp/b200/b200_uart.hpp | 4 +-- host/lib/usrp/common/ad9361_ctrl.cpp | 6 ++-- host/lib/usrp/common/ad9361_driver/ad9361_client.h | 6 ++-- .../usrp/common/ad9361_driver/ad9361_device.cpp | 14 ++++---- host/lib/usrp/common/ad936x_manager.cpp | 4 +-- host/lib/usrp/cores/spi_core_3000.cpp | 6 ++-- host/lib/usrp/dboard/db_sbx_common.hpp | 2 +- host/lib/usrp/dboard/db_twinrx.cpp | 10 +++--- host/lib/usrp/dboard/db_ubx.cpp | 10 +++--- host/lib/usrp/dboard/db_wbx_common.hpp | 4 +-- .../usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp | 2 ++ .../dboard/magnesium/magnesium_radio_control.cpp | 2 +- .../magnesium/magnesium_radio_control_init.cpp | 2 +- .../usrp/dboard/rhodium/rhodium_radio_control.cpp | 2 +- .../usrp/dboard/rhodium/rhodium_radio_control.hpp | 2 +- host/lib/usrp/dboard/twinrx/twinrx_io.hpp | 4 +-- host/lib/usrp/mpmd/mpmd_impl.cpp | 4 +-- host/lib/usrp/multi_usrp.cpp | 6 ++-- host/lib/usrp/multi_usrp_rfnoc.cpp | 4 +-- host/lib/usrp/usrp1/codec_ctrl.hpp | 4 +-- host/lib/usrp/usrp1/io_impl.cpp | 18 +++++----- host/lib/usrp/usrp1/soft_time_ctrl.cpp | 8 ++--- host/lib/usrp/usrp1/soft_time_ctrl.hpp | 4 +-- host/lib/usrp/usrp1/usrp1_iface.hpp | 4 +-- host/lib/usrp/usrp1/usrp1_impl.hpp | 18 +++++----- host/lib/usrp/usrp2/clock_ctrl.hpp | 4 +-- host/lib/usrp/usrp2/codec_ctrl.hpp | 4 +-- host/lib/usrp/usrp2/io_impl.cpp | 24 ++++++------- host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp | 4 +-- host/lib/usrp/usrp2/usrp2_iface.hpp | 4 +-- host/lib/usrp/usrp2/usrp2_impl.hpp | 7 ++-- host/lib/usrp/x300/x300_adc_ctrl.hpp | 4 +-- host/lib/usrp/x300/x300_clock_ctrl.hpp | 4 +-- host/lib/usrp/x300/x300_dac_ctrl.hpp | 4 +-- host/lib/usrp/x300/x300_mb_eeprom_iface.cpp | 4 +-- host/lib/usrp/x300/x300_mb_eeprom_iface.hpp | 4 +-- host/lib/usrp/x300/x300_pcie_mgr.cpp | 4 +-- host/lib/usrp/x300/x300_radio_control.cpp | 6 ++-- 49 files changed, 181 insertions(+), 181 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp index 492db5740..bb72cd63e 100644 --- a/host/lib/usrp/b100/b100_impl.hpp +++ b/host/lib/usrp/b100/b100_impl.hpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include static const double B100_LINK_RATE_BPS = 256e6/5; //pratical link rate (< 480 Mbps) static const std::string B100_FW_FILE_NAME = "usrp_b100_fw.ihx"; @@ -112,14 +112,14 @@ private: //transports uhd::transport::zero_copy_if::sptr _ctrl_transport; uhd::transport::zero_copy_if::sptr _data_transport; - boost::shared_ptr _recv_demuxer; + std::shared_ptr _recv_demuxer; //dboard stuff uhd::usrp::dboard_manager::sptr _dboard_manager; bool _ignore_cal_file; - std::vector > _rx_streamers; - std::vector > _tx_streamers; + std::vector > _rx_streamers; + std::vector > _tx_streamers; void check_fw_compat(void); void check_fpga_compat(void); diff --git a/host/lib/usrp/b100/clock_ctrl.hpp b/host/lib/usrp/b100/clock_ctrl.hpp index a6f516e15..b208e8a0c 100644 --- a/host/lib/usrp/b100/clock_ctrl.hpp +++ b/host/lib/usrp/b100/clock_ctrl.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include /*! @@ -19,7 +19,7 @@ */ class b100_clock_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~b100_clock_ctrl(void) = 0; diff --git a/host/lib/usrp/b100/codec_ctrl.hpp b/host/lib/usrp/b100/codec_ctrl.hpp index 67a5f7e9c..5f77d00f9 100644 --- a/host/lib/usrp/b100/codec_ctrl.hpp +++ b/host/lib/usrp/b100/codec_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include /*! * The B100 codec control: @@ -20,7 +20,7 @@ */ class b100_codec_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static const uhd::gain_range_t tx_pga_gain_range; static const uhd::gain_range_t rx_pga_gain_range; diff --git a/host/lib/usrp/b100/fifo_ctrl_excelsior.hpp b/host/lib/usrp/b100/fifo_ctrl_excelsior.hpp index 91c006a1a..27da0026c 100644 --- a/host/lib/usrp/b100/fifo_ctrl_excelsior.hpp +++ b/host/lib/usrp/b100/fifo_ctrl_excelsior.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ struct fifo_ctrl_excelsior_config class fifo_ctrl_excelsior : public uhd::timed_wb_iface, public uhd::spi_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //! Make a new control object static sptr make( diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp index ed90b11ba..d3de1cca1 100644 --- a/host/lib/usrp/b100/io_impl.cpp +++ b/host/lib/usrp/b100/io_impl.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include using namespace uhd; using namespace uhd::usrp; @@ -38,22 +38,22 @@ void b100_impl::update_tick_rate(const double rate){ //update the tick rate on all existing streamers -> thread safe for (size_t i = 0; i < _rx_streamers.size(); i++){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_rx_streamers[i].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_rx_streamers[i].lock()); if (my_streamer.get() == NULL) continue; my_streamer->set_tick_rate(rate); } for (size_t i = 0; i < _tx_streamers.size(); i++){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_tx_streamers[i].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_tx_streamers[i].lock()); if (my_streamer.get() == NULL) continue; my_streamer->set_tick_rate(rate); } } void b100_impl::update_rx_samp_rate(const size_t dspno, const double rate){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_rx_streamers[dspno].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_rx_streamers[dspno].lock()); if (my_streamer.get() == NULL) return; my_streamer->set_samp_rate(rate); @@ -62,8 +62,8 @@ void b100_impl::update_rx_samp_rate(const size_t dspno, const double rate){ } void b100_impl::update_tx_samp_rate(const size_t dspno, const double rate){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_tx_streamers[dspno].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_tx_streamers[dspno].lock()); if (my_streamer.get() == NULL) return; my_streamer->set_samp_rate(rate); @@ -129,7 +129,7 @@ rx_streamer::sptr b100_impl::get_rx_stream(const uhd::stream_args_t &args_){ const size_t spp = unsigned(args.args.cast("spp", bpp/bpi)); //make the new streamer given the samples per packet - boost::shared_ptr my_streamer = boost::make_shared(spp); + std::shared_ptr my_streamer = std::make_shared(spp); //init some streamer stuff my_streamer->resize(args.channels.size()); @@ -188,7 +188,7 @@ tx_streamer::sptr b100_impl::get_tx_stream(const uhd::stream_args_t &args_){ const size_t spp = bpp/convert::get_bytes_per_item(args.otw_format); //make the new streamer given the samples per packet - boost::shared_ptr my_streamer = boost::make_shared(spp); + std::shared_ptr my_streamer = std::make_shared(spp); //init some streamer stuff my_streamer->resize(args.channels.size()); diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp index 54c367077..6303c301d 100644 --- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp +++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -161,9 +161,9 @@ public: _next_recv_buff_index(0) { for (size_t i = 0; i < this->get_num_recv_frames(); i++){ - _mrb_pool.push_back(boost::make_shared()); + _mrb_pool.push_back(std::make_shared()); } - _the_only_msb = boost::make_shared(usb_zc, frame_boundary); + _the_only_msb = std::make_shared(usb_zc, frame_boundary); } managed_recv_buffer::sptr get_recv_buff(double timeout){ @@ -211,8 +211,8 @@ public: private: zero_copy_if::sptr _internal_zc; size_t _frame_boundary; - std::vector > _mrb_pool; - boost::shared_ptr _the_only_msb; + std::vector > _mrb_pool; + std::shared_ptr _the_only_msb; //state for last recv buffer to create multiple managed buffers managed_recv_buffer::sptr _last_recv_buff; diff --git a/host/lib/usrp/b200/b200_cores.hpp b/host/lib/usrp/b200/b200_cores.hpp index 7dabb66e9..324938a73 100644 --- a/host/lib/usrp/b200/b200_cores.hpp +++ b/host/lib/usrp/b200/b200_cores.hpp @@ -12,13 +12,13 @@ #include #include #include -#include +#include #include class b200_local_spi_core : uhd::noncopyable, public uhd::spi_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum perif_t { CODEC, PLL @@ -47,7 +47,7 @@ private: class b200_ref_pll_ctrl : public uhd::usrp::adf4001_ctrl { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; b200_ref_pll_ctrl(b200_local_spi_core::sptr spi); virtual void set_lock_to_ext_ref(bool external); diff --git a/host/lib/usrp/b200/b200_iface.hpp b/host/lib/usrp/b200/b200_iface.hpp index 4389d4eed..a3059bacf 100644 --- a/host/lib/usrp/b200/b200_iface.hpp +++ b/host/lib/usrp/b200/b200_iface.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -79,7 +79,7 @@ static const uhd::dict B2XX_FPGA_FILE_NAME = boost: class UHD_API b200_iface: uhd::noncopyable, public virtual uhd::i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a b200 interface object from a control transport diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 1be8c263b..be21ade63 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -20,8 +20,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -255,7 +254,7 @@ static device::sptr b200_make(const device_addr_t &device_addr) catch (const uhd::usb_error &) { UHD_LOGGER_INFO("B200") << "Detected bad USB state; resetting." ; libusb::device_handle::sptr dev_handle(libusb::device_handle::get_cached_handle( - boost::static_pointer_cast(handle)->get_device() + std::static_pointer_cast(handle)->get_device() )); dev_handle->clear_endpoints(B200_USB_CTRL_RECV_ENDPOINT, B200_USB_CTRL_SEND_ENDPOINT); dev_handle->clear_endpoints(B200_USB_DATA_RECV_ENDPOINT, B200_USB_DATA_SEND_ENDPOINT); @@ -578,7 +577,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s //////////////////////////////////////////////////////////////////// _spi_iface = b200_local_spi_core::make(_local_ctrl); if (not (_product == B200MINI or _product == B205MINI)) { - _adf4001_iface = boost::make_shared(_spi_iface); + _adf4001_iface = std::make_shared(_spi_iface); } //////////////////////////////////////////////////////////////////// @@ -588,9 +587,9 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s reset_codec(); ad9361_params::sptr client_settings; if (_product == B200MINI or _product == B205MINI) { - client_settings = boost::make_shared(); + client_settings = std::make_shared(); } else { - client_settings = boost::make_shared(); + client_settings = std::make_shared(); } _codec_ctrl = ad9361_ctrl::make_spi(client_settings, _spi_iface, AD9361_SLAVENO); diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 6e777d4d6..bd44aa14f 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -36,8 +36,8 @@ #include #include #include -#include #include +#include static const uint8_t B200_FW_COMPAT_NUM_MAJOR = 8; static const uint8_t B200_FW_COMPAT_NUM_MINOR = 0; @@ -138,7 +138,7 @@ private: uhd::usrp::ad9361_ctrl::sptr _codec_ctrl; uhd::usrp::ad936x_manager::sptr _codec_mgr; b200_local_spi_core::sptr _spi_iface; - boost::shared_ptr _adf4001_iface; + std::shared_ptr _adf4001_iface; uhd::gps_ctrl::sptr _gps; //transports @@ -146,8 +146,8 @@ private: uhd::transport::zero_copy_if::sptr _ctrl_transport; uhd::usrp::recv_packet_demuxer_3000::sptr _demux; - boost::weak_ptr _rx_streamer; - boost::weak_ptr _tx_streamer; + std::weak_ptr _rx_streamer; + std::weak_ptr _tx_streamer; std::mutex _transport_setup_mutex; @@ -156,13 +156,13 @@ private: typedef uhd::transport::bounded_buffer async_md_type; struct AsyncTaskData { - boost::shared_ptr async_md; - boost::weak_ptr local_ctrl; - boost::weak_ptr radio_ctrl[2]; + std::shared_ptr async_md; + std::weak_ptr local_ctrl; + std::weak_ptr radio_ctrl[2]; b200_uart::sptr gpsdo_uart; }; - boost::shared_ptr _async_task_data; - boost::optional handle_async_task(uhd::transport::zero_copy_if::sptr, boost::shared_ptr); + std::shared_ptr _async_task_data; + boost::optional handle_async_task(uhd::transport::zero_copy_if::sptr, std::shared_ptr); void register_loopback_self_test(uhd::wb_iface::sptr iface); void set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &); @@ -191,8 +191,8 @@ private: rx_dsp_core_3000::sptr ddc; tx_vita_core_3000::sptr deframer; tx_dsp_core_3000::sptr duc; - boost::weak_ptr rx_streamer; - boost::weak_ptr tx_streamer; + std::weak_ptr rx_streamer; + std::weak_ptr tx_streamer; user_settings_core_3000::sptr user_settings; bool ant_rx2; }; diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 5a0de430f..88cde6071 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include using namespace uhd; @@ -37,15 +37,15 @@ size_t b200_impl::max_chan_count(const std::string& direction /* = "" */) for (radio_perifs_t& perif : _radio_perifs) { if ((direction == "RX" or direction.empty()) and not perif.rx_streamer.expired()) { - boost::shared_ptr rx_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr rx_streamer = + std::dynamic_pointer_cast( perif.rx_streamer.lock()); max_count = std::max(max_count, rx_streamer->get_num_channels()); } if ((direction == "TX" or direction.empty()) and not perif.tx_streamer.expired()) { - boost::shared_ptr tx_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr tx_streamer = + std::dynamic_pointer_cast( perif.tx_streamer.lock()); max_count = std::max(max_count, tx_streamer->get_num_channels()); } @@ -142,16 +142,16 @@ void b200_impl::update_tick_rate(const double new_tick_rate) check_tick_rate_with_current_streamers(new_tick_rate); for (radio_perifs_t& perif : _radio_perifs) { - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr my_streamer = + std::dynamic_pointer_cast( perif.rx_streamer.lock()); if (my_streamer) my_streamer->set_tick_rate(new_tick_rate); perif.framer->set_tick_rate(new_tick_rate); } for (radio_perifs_t& perif : _radio_perifs) { - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr my_streamer = + std::dynamic_pointer_cast( perif.tx_streamer.lock()); if (my_streamer) my_streamer->set_tick_rate(new_tick_rate); @@ -204,8 +204,8 @@ double b200_impl::coerce_rx_samp_rate( void b200_impl::update_rx_samp_rate(const size_t dspno, const double rate) { - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr my_streamer = + std::dynamic_pointer_cast( _radio_perifs[dspno].rx_streamer.lock()); if (not my_streamer) return; @@ -231,8 +231,8 @@ double b200_impl::coerce_tx_samp_rate( void b200_impl::update_tx_samp_rate(const size_t dspno, const double rate) { - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr my_streamer = + std::dynamic_pointer_cast( _radio_perifs[dspno].tx_streamer.lock()); if (not my_streamer) return; @@ -314,7 +314,7 @@ bool b200_impl::recv_async_msg(async_metadata_t& async_metadata, double timeout) * there. */ boost::optional b200_impl::handle_async_task( - uhd::transport::zero_copy_if::sptr xport, boost::shared_ptr data) + uhd::transport::zero_copy_if::sptr xport, std::shared_ptr data) { managed_recv_buffer::sptr buff = xport->get_recv_buff(); if (not buff or buff->size() < 8) @@ -405,7 +405,7 @@ rx_streamer::sptr b200_impl::get_rx_stream(const uhd::stream_args_t& args_) } check_streamer_args(args, this->get_tick_rate(), "RX"); - boost::shared_ptr my_streamer; + std::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) { const size_t radio_index = _tree->access>("/mboards/0/rx_chan_dsp_mapping") @@ -437,7 +437,7 @@ rx_streamer::sptr b200_impl::get_rx_stream(const uhd::stream_args_t& args_) // make the new streamer given the samples per packet if (not my_streamer) - my_streamer = boost::make_shared(spp); + my_streamer = std::make_shared(spp); my_streamer->resize(args.channels.size()); // init some streamer stuff @@ -480,8 +480,8 @@ rx_streamer::sptr b200_impl::get_rx_stream(const uhd::stream_args_t& args_) void b200_impl::handle_overflow(const size_t radio_index) { - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast( + std::shared_ptr my_streamer = + std::dynamic_pointer_cast( _radio_perifs[radio_index].rx_streamer.lock()); if (my_streamer->get_num_channels() == 2) // MIMO time { @@ -527,7 +527,7 @@ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t& args_) } check_streamer_args(args, this->get_tick_rate(), "TX"); - boost::shared_ptr my_streamer; + std::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) { const size_t radio_index = _tree->access>("/mboards/0/tx_chan_dsp_mapping") @@ -556,7 +556,7 @@ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t& args_) // make the new streamer given the samples per packet if (not my_streamer) - my_streamer = boost::make_shared(spp); + my_streamer = std::make_shared(spp); my_streamer->resize(args.channels.size()); // init some streamer stuff diff --git a/host/lib/usrp/b200/b200_uart.hpp b/host/lib/usrp/b200/b200_uart.hpp index 25dc1171e..c6de5f844 100644 --- a/host/lib/usrp/b200/b200_uart.hpp +++ b/host/lib/usrp/b200/b200_uart.hpp @@ -12,12 +12,12 @@ #include #include //uart iface #include -#include +#include class b200_uart: uhd::noncopyable, public uhd::uart_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make(uhd::transport::zero_copy_if::sptr, const uint32_t sid); virtual void handle_uart_packet(uhd::transport::managed_recv_buffer::sptr buff) = 0; }; diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp index b89ec2d32..8e57c48c9 100644 --- a/host/lib/usrp/common/ad9361_ctrl.cpp +++ b/host/lib/usrp/common/ad9361_ctrl.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -325,8 +325,8 @@ ad9361_ctrl::sptr ad9361_ctrl::make_spi(ad9361_params::sptr client_settings, uhd::spi_iface::sptr spi_iface, uint32_t slave_num) { - boost::shared_ptr spi_io_iface = - boost::make_shared(spi_iface, slave_num); + std::shared_ptr spi_io_iface = + std::make_shared(spi_iface, slave_num); return sptr(new ad9361_ctrl_impl(client_settings, spi_io_iface)); } diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_client.h b/host/lib/usrp/common/ad9361_driver/ad9361_client.h index a2343a3db..e8201825a 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_client.h +++ b/host/lib/usrp/common/ad9361_driver/ad9361_client.h @@ -8,7 +8,7 @@ #ifndef INCLUDED_AD9361_CLIENT_H #define INCLUDED_AD9361_CLIENT_H -#include +#include namespace uhd { namespace usrp { @@ -49,7 +49,7 @@ typedef struct { class ad9361_params { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~ad9361_params() {} @@ -62,7 +62,7 @@ public: class ad9361_io { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~ad9361_io() {} diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index a3d3552ef..44b650f52 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -2733,8 +2733,8 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_2(direction_t direction) int16_t taps_array[] = {-9, 0, 73, 128, 73, 0, -9}; std::vector taps(taps_array, taps_array + sizeof(taps_array) / sizeof(int16_t) ); - digital_filter_base::sptr hb_3 = boost::dynamic_pointer_cast >(_get_filter_hb_3(direction)); - digital_filter_base::sptr dec_int_3 = boost::dynamic_pointer_cast >(_get_filter_dec_int_3(direction)); + digital_filter_base::sptr hb_3 = std::dynamic_pointer_cast >(_get_filter_hb_3(direction)); + digital_filter_base::sptr dec_int_3 = std::dynamic_pointer_cast >(_get_filter_dec_int_3(direction)); if(direction == RX) { @@ -2791,7 +2791,7 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_1(direction_t direction) int16_t taps_rx_array[] = {-8, 0, 42, 0, -147, 0, 619, 1013, 619, 0, -147, 0, 42, 0, -8}; int16_t taps_tx_array[] = {-53, 0, 313, 0, -1155, 0, 4989, 8192, 4989, 0, -1155, 0, 313, 0, -53}; - digital_filter_base::sptr hb_2 = boost::dynamic_pointer_cast >(_get_filter_hb_2(direction)); + digital_filter_base::sptr hb_2 = std::dynamic_pointer_cast >(_get_filter_hb_2(direction)); if(direction == RX) { @@ -2826,7 +2826,7 @@ filter_info_base::sptr ad9361_device_t::_get_filter_fir(direction_t direction, c size_t max_num_taps = 128; uint8_t enable = 1; - digital_filter_base::sptr hb_1 = boost::dynamic_pointer_cast >(_get_filter_hb_1(direction)); + digital_filter_base::sptr hb_1 = std::dynamic_pointer_cast >(_get_filter_hb_1(direction)); if(direction == RX) { @@ -2861,7 +2861,7 @@ filter_info_base::sptr ad9361_device_t::_get_filter_fir(direction_t direction, c void ad9361_device_t::_set_filter_fir(direction_t direction, chain_t channel, filter_info_base::sptr filter) { - digital_filter_fir::sptr fir = boost::dynamic_pointer_cast >(filter); + digital_filter_fir::sptr fir = std::dynamic_pointer_cast >(filter); //only write taps. Ignore everything else for now _set_fir_taps(direction, channel, fir->get_taps()); } @@ -2873,7 +2873,7 @@ void ad9361_device_t::_set_filter_fir(direction_t direction, chain_t channel, fi */ void ad9361_device_t::_set_filter_lp_bb(direction_t direction, filter_info_base::sptr filter) { - analog_filter_lp::sptr lpf = boost::dynamic_pointer_cast(filter); + analog_filter_lp::sptr lpf = std::dynamic_pointer_cast(filter); double bw = lpf->get_cutoff(); if(direction == RX) { @@ -2888,7 +2888,7 @@ void ad9361_device_t::_set_filter_lp_bb(direction_t direction, filter_info_base: void ad9361_device_t::_set_filter_lp_tia_sec(direction_t direction, filter_info_base::sptr filter) { - analog_filter_lp::sptr lpf = boost::dynamic_pointer_cast(filter); + analog_filter_lp::sptr lpf = std::dynamic_pointer_cast(filter); double bw = lpf->get_cutoff(); if(direction == RX) { diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp index 5c4cb51ae..b57b94302 100644 --- a/host/lib/usrp/common/ad936x_manager.cpp +++ b/host/lib/usrp/common/ad936x_manager.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -329,5 +329,5 @@ private: ad936x_manager::sptr ad936x_manager::make( const ad9361_ctrl::sptr& codec_ctrl, const size_t n_frontends) { - return boost::make_shared(codec_ctrl, n_frontends); + return std::make_shared(codec_ctrl, n_frontends); } diff --git a/host/lib/usrp/cores/spi_core_3000.cpp b/host/lib/usrp/cores/spi_core_3000.cpp index ea476879b..fb9d9d549 100644 --- a/host/lib/usrp/cores/spi_core_3000.cpp +++ b/host/lib/usrp/cores/spi_core_3000.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -128,7 +128,7 @@ private: spi_core_3000::sptr spi_core_3000::make( wb_iface::sptr iface, const size_t base, const size_t readback) { - return boost::make_shared( + return std::make_shared( [iface]( const uint32_t addr, const uint32_t value) { iface->poke32(addr, value); }, [iface](const uint32_t addr) { return iface->peek32(addr); }, @@ -143,6 +143,6 @@ spi_core_3000::sptr spi_core_3000::make(spi_core_3000::poke32_fn_t&& poke32_fn, const size_t reg_offset, const size_t readback) { - return boost::make_shared( + return std::make_shared( std::move(poke32_fn), std::move(peek32_fn), base, reg_offset, readback); } diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp index 4d463603f..9c09f21a3 100644 --- a/host/lib/usrp/dboard/db_sbx_common.hpp +++ b/host/lib/usrp/dboard/db_sbx_common.hpp @@ -272,7 +272,7 @@ protected: * sbx_version* subclass, and invoke any relevant functions through that * object. This pointer is set to the proper object at construction time. */ - typedef boost::shared_ptr sbx_versionx_sptr; + typedef std::shared_ptr sbx_versionx_sptr; sbx_versionx_sptr db_actual; }; diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp index de1cd3f33..5a8fefeb7 100644 --- a/host/lib/usrp/dboard/db_twinrx.cpp +++ b/host/lib/usrp/dboard/db_twinrx.cpp @@ -19,7 +19,7 @@ #include #include #include "dboard_ctor_args.hpp" -#include +#include #include #include //#include //Needed for _expert->to_dot() below @@ -229,13 +229,13 @@ private: class twinrx_rcvr : public rx_dboard_base { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; twinrx_rcvr(ctor_args_t args) : rx_dboard_base(args) { _db_iface = get_iface(); - twinrx_gpio::sptr gpio_iface = boost::make_shared(_db_iface); - twinrx_cpld_regmap::sptr cpld_regs = boost::make_shared(); + twinrx_gpio::sptr gpio_iface = std::make_shared(_db_iface); + twinrx_cpld_regmap::sptr cpld_regs = std::make_shared(); cpld_regs->initialize(*gpio_iface, false); _ctrl = twinrx_ctrl::make(_db_iface, gpio_iface, cpld_regs, get_rx_id()); _expert = expert_factory::create_container("twinrx_expert"); @@ -304,7 +304,7 @@ public: static dboard_base::sptr make_twinrx_fe(dboard_base::ctor_args_t args) { const dboard_ctor_args_t& db_args = dboard_ctor_args_t::cast(args); - sptr container = boost::dynamic_pointer_cast(db_args.rx_container); + sptr container = std::dynamic_pointer_cast(db_args.rx_container); if (container) { dboard_base::sptr fe = dboard_base::sptr( new twinrx_rcvr_fe(args, container->get_expert(), container->get_ctrl())); diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 305a69c52..72b3e331d 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -1329,10 +1329,10 @@ private: ubx_cpld_reg_t _cpld_reg; uint32_t _prev_cpld_value; std::map _gpio_map; - boost::shared_ptr _txlo1; - boost::shared_ptr _txlo2; - boost::shared_ptr _rxlo1; - boost::shared_ptr _rxlo2; + std::shared_ptr _txlo1; + std::shared_ptr _txlo2; + std::shared_ptr _rxlo1; + std::shared_ptr _rxlo2; double _tx_target_pfd_freq; double _rx_target_pfd_freq; double _tx_gain; diff --git a/host/lib/usrp/dboard/db_wbx_common.hpp b/host/lib/usrp/dboard/db_wbx_common.hpp index ea012c91c..ec6459583 100644 --- a/host/lib/usrp/dboard/db_wbx_common.hpp +++ b/host/lib/usrp/dboard/db_wbx_common.hpp @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include @@ -200,7 +200,7 @@ protected: * wbx_version_* subclass, and invoke any relevant functions through that * object. This pointer is set to the proper object at construction time. */ - typedef boost::shared_ptr wbx_versionx_sptr; + typedef std::shared_ptr wbx_versionx_sptr; wbx_versionx_sptr db_actual; uhd::dict _tx_gains, _rx_gains; diff --git a/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp b/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp index 05455e3fd..8f4ee0caa 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp @@ -1,5 +1,6 @@ // // Copyright 2017 Ettus Research, a National Instruments Company +// Copyright 2019 Ettus Research, a National Instruments Brand // // SPDX-License-Identifier: GPL-3.0-or-later // @@ -12,6 +13,7 @@ #include #include #include +#include //! Controls the CPLD on a Magnesium daughterboard // diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp index 13186e146..32c16adc6 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp index d8a1ccba8..a1b039079 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp index df2c3aadd..54c6333bc 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp index a70db79cc..8cee33f17 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp @@ -29,7 +29,7 @@ namespace uhd { namespace rfnoc { class rhodium_radio_control_impl : public radio_control_impl { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //! Frequency bands for RX. Bands are a function of the analog filter banks enum class rx_band { diff --git a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp index ea1f1150a..e3e475148 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp @@ -41,7 +41,7 @@ static uint32_t get_reg(wb_iface::wb_addr_type addr) { class twinrx_gpio : public wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //---------------------------------------------- //Public GPIO fields @@ -123,7 +123,7 @@ private: //Members/definitions class twinrx_cpld_regmap : public uhd::soft_regmap_t { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //---------------------------------------------- // IF CCA: CPLD 1 diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 69f990807..cb463b3f4 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -244,7 +244,7 @@ void mpmd_impl::setup_mb(mpmd_mboard_impl* mb, const size_t mb_index) ****************************************************************************/ static device::sptr mpmd_make(const device_addr_t& device_args) { - return device::sptr(boost::make_shared(device_args)); + return device::sptr(std::make_shared(device_args)); } UHD_STATIC_BLOCK(register_mpmd_device) diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 6f8b794ce..4c6372fd5 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -2510,9 +2510,9 @@ multi_usrp::sptr multi_usrp::make(const device_addr_t& dev_addr) device::sptr dev = device::make(dev_addr, device::USRP); - auto rfnoc_dev = boost::dynamic_pointer_cast(dev); + auto rfnoc_dev = std::dynamic_pointer_cast(dev); if (rfnoc_dev) { return rfnoc::detail::make_rfnoc_device(rfnoc_dev, dev_addr); } - return boost::make_shared(dev); + return std::make_shared(dev); } diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp index 757872632..d7bc49639 100644 --- a/host/lib/usrp/multi_usrp_rfnoc.cpp +++ b/host/lib/usrp/multi_usrp_rfnoc.cpp @@ -15,10 +15,10 @@ #include #include #include -#include #include #include #include +#include #include #include #include @@ -2211,7 +2211,7 @@ multi_usrp::sptr make_rfnoc_device( detail::rfnoc_device::sptr rfnoc_device, const uhd::device_addr_t& dev_addr) { auto graph = uhd::rfnoc::detail::make_rfnoc_graph(rfnoc_device, dev_addr); - return boost::make_shared(graph, dev_addr); + return std::make_shared(graph, dev_addr); } }}} // namespace uhd::rfnoc::detail diff --git a/host/lib/usrp/usrp1/codec_ctrl.hpp b/host/lib/usrp/usrp1/codec_ctrl.hpp index dd038fb82..c03947673 100644 --- a/host/lib/usrp/usrp1/codec_ctrl.hpp +++ b/host/lib/usrp/usrp1/codec_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include /*! * The usrp1 codec control: @@ -20,7 +20,7 @@ */ class usrp1_codec_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static const uhd::gain_range_t tx_pga_gain_range; static const uhd::gain_range_t rx_pga_gain_range; diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp index 3ccfa11c9..3d45824e4 100644 --- a/host/lib/usrp/usrp1/io_impl.cpp +++ b/host/lib/usrp/usrp1/io_impl.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -508,8 +508,8 @@ double usrp1_impl::update_rx_samp_rate(size_t dspno, const double samp_rate){ this->restore_rx(s); //update the streamer if created - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_rx_streamer.lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_rx_streamer.lock()); if (my_streamer.get() != NULL){ my_streamer->set_samp_rate(_master_clock_rate / rate); } @@ -530,8 +530,8 @@ double usrp1_impl::update_tx_samp_rate(size_t dspno, const double samp_rate){ this->restore_tx(s); //update the streamer if created - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_tx_streamer.lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_tx_streamer.lock()); if (my_streamer.get() != NULL){ my_streamer->set_samp_rate(_master_clock_rate / rate); } @@ -631,8 +631,8 @@ rx_streamer::sptr usrp1_impl::get_rx_stream(const uhd::stream_args_t &args_){ const size_t spp = bpp/convert::get_bytes_per_item(args.otw_format); //make the new streamer given the samples per packet - boost::shared_ptr my_streamer = - boost::make_shared(spp, _soft_time_ctrl); + std::shared_ptr my_streamer = + std::make_shared(spp, _soft_time_ctrl); //init some streamer stuff my_streamer->set_tick_rate(_master_clock_rate); @@ -688,8 +688,8 @@ tx_streamer::sptr usrp1_impl::get_tx_stream(const uhd::stream_args_t &args_){ //make the new streamer given the samples per packet boost::function tx_fcn = boost::bind(&usrp1_impl::tx_stream_on_off, this, _1); - boost::shared_ptr my_streamer = - boost::make_shared(spp, _soft_time_ctrl, tx_fcn); + std::shared_ptr my_streamer = + std::make_shared(spp, _soft_time_ctrl, tx_fcn); //init some streamer stuff my_streamer->set_tick_rate(_master_clock_rate); diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index 7f39caf8a..92031136d 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -8,7 +8,7 @@ #include "soft_time_ctrl.hpp" #include #include -#include +#include #include #include #include @@ -116,7 +116,7 @@ public: } void issue_stream_cmd(const stream_cmd_t &cmd){ - _cmd_queue.push_with_wait(boost::make_shared(cmd)); + _cmd_queue.push_with_wait(std::make_shared(cmd)); } void stream_on_off(bool enb){ @@ -190,7 +190,7 @@ public: } void recv_cmd_task(void){ //task is looped - boost::shared_ptr cmd; + std::shared_ptr cmd; if (_cmd_queue.pop_with_timed_wait(cmd, 0.25)) { recv_cmd_handle_cmd(*cmd); } @@ -213,7 +213,7 @@ private: size_t _nsamps_remaining; stream_cmd_t::stream_mode_t _stream_mode; time_spec_t _time_offset; - bounded_buffer > _cmd_queue; + bounded_buffer > _cmd_queue; bounded_buffer _async_msg_queue; bounded_buffer _inline_msg_queue; const cb_fcn_type _stream_on_off; diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.hpp b/host/lib/usrp/usrp1/soft_time_ctrl.hpp index 1422a5ced..9143b6af2 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.hpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include namespace uhd{ namespace usrp{ @@ -27,7 +27,7 @@ namespace uhd{ namespace usrp{ */ class soft_time_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function cb_fcn_type; virtual ~soft_time_ctrl(void) = 0; diff --git a/host/lib/usrp/usrp1/usrp1_iface.hpp b/host/lib/usrp/usrp1/usrp1_iface.hpp index 4fb5cd4ee..b01b2d088 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.hpp +++ b/host/lib/usrp/usrp1/usrp1_iface.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #define SPI_ENABLE_FPGA 0x01 @@ -35,7 +35,7 @@ class usrp1_iface : public uhd::wb_iface, public uhd::i2c_iface, public uhd::spi_iface, uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a new usrp1 interface with the control transport. diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp index 1cf8362e1..9e0a97f47 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.hpp +++ b/host/lib/usrp/usrp1/usrp1_impl.hpp @@ -5,23 +5,23 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include "usrp1_iface.hpp" #include "codec_ctrl.hpp" #include "soft_time_ctrl.hpp" +#include "usrp1_iface.hpp" #include #include -#include +#include #include #include +#include #include +#include #include #include -#include -#include -#include -#include -#include +#include #include +#include +#include #ifndef INCLUDED_USRP1_IMPL_HPP #define INCLUDED_USRP1_IMPL_HPP @@ -89,8 +89,8 @@ private: double _master_clock_rate; //clock rate shadow //weak pointers to streamers for update purposes - boost::weak_ptr _rx_streamer; - boost::weak_ptr _tx_streamer; + std::weak_ptr _rx_streamer; + std::weak_ptr _tx_streamer; void set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &); void set_db_eeprom(const std::string &, const std::string &, const uhd::usrp::dboard_eeprom_t &); diff --git a/host/lib/usrp/usrp2/clock_ctrl.hpp b/host/lib/usrp/usrp2/clock_ctrl.hpp index 53f0d0aef..b82dd4723 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.hpp +++ b/host/lib/usrp/usrp2/clock_ctrl.hpp @@ -10,12 +10,12 @@ #include "usrp2_iface.hpp" #include -#include +#include #include class usrp2_clock_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usrp2_clock_ctrl(void) = 0; diff --git a/host/lib/usrp/usrp2/codec_ctrl.hpp b/host/lib/usrp/usrp2/codec_ctrl.hpp index 37c8d6fa3..c769d102a 100644 --- a/host/lib/usrp/usrp2/codec_ctrl.hpp +++ b/host/lib/usrp/usrp2/codec_ctrl.hpp @@ -9,12 +9,12 @@ #define INCLUDED_CODEC_CTRL_HPP #include "usrp2_iface.hpp" -#include +#include #include class usrp2_codec_ctrl : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usrp2_codec_ctrl(void) = 0; diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 7042f0391..d965b4e24 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ static const size_t vrt_send_header_offset_words32 = 1; class flow_control_monitor{ public: typedef uint32_t seq_type; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a new flow control monitor. @@ -256,14 +256,14 @@ void usrp2_impl::update_tick_rate(const double rate){ //update the tick rate on all existing streamers -> thread safe for(const std::string &mb: _mbc.keys()){ for (size_t i = 0; i < _mbc[mb].rx_streamers.size(); i++){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_mbc[mb].rx_streamers[i].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_mbc[mb].rx_streamers[i].lock()); if (my_streamer.get() == NULL) continue; my_streamer->set_tick_rate(rate); } for (size_t i = 0; i < _mbc[mb].tx_streamers.size(); i++){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_mbc[mb].tx_streamers[i].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_mbc[mb].tx_streamers[i].lock()); if (my_streamer.get() == NULL) continue; my_streamer->set_tick_rate(rate); } @@ -271,8 +271,8 @@ void usrp2_impl::update_tick_rate(const double rate){ } void usrp2_impl::update_rx_samp_rate(const std::string &mb, const size_t dsp, const double rate){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_mbc[mb].rx_streamers[dsp].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_mbc[mb].rx_streamers[dsp].lock()); if (my_streamer.get() == NULL) return; my_streamer->set_samp_rate(rate); @@ -281,8 +281,8 @@ void usrp2_impl::update_rx_samp_rate(const std::string &mb, const size_t dsp, co } void usrp2_impl::update_tx_samp_rate(const std::string &mb, const size_t dsp, const double rate){ - boost::shared_ptr my_streamer = - boost::dynamic_pointer_cast(_mbc[mb].tx_streamers[dsp].lock()); + std::shared_ptr my_streamer = + std::dynamic_pointer_cast(_mbc[mb].tx_streamers[dsp].lock()); if (my_streamer.get() == NULL) return; my_streamer->set_samp_rate(rate); @@ -429,7 +429,7 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){ const size_t spp = args.args.cast("spp", bpp/bpi); //make the new streamer given the samples per packet - boost::shared_ptr my_streamer = boost::make_shared(spp); + std::shared_ptr my_streamer = std::make_shared(spp); //init some streamer stuff my_streamer->resize(args.channels.size()); @@ -498,7 +498,7 @@ tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args_){ const size_t spp = bpp/convert::get_bytes_per_item(args.otw_format); //make the new streamer given the samples per packet - boost::shared_ptr my_streamer = boost::make_shared(spp); + std::shared_ptr my_streamer = std::make_shared(spp); //init some streamer stuff my_streamer->resize(args.channels.size()); diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp index 1e670a7f4..cbb243a79 100644 --- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp +++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -23,7 +23,7 @@ class usrp2_fifo_ctrl : public uhd::timed_wb_iface, public uhd::spi_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //! Make a new FIFO control object static sptr make(uhd::transport::zero_copy_if::sptr xport); diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp index 05cdfba54..2752d1a28 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.hpp +++ b/host/lib/usrp/usrp2/usrp2_iface.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include "usrp2_regs.hpp" @@ -26,7 +26,7 @@ class usrp2_iface : public uhd::timed_wb_iface, public uhd::spi_iface, public uhd::i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a new usrp2 interface with the control transport. * \param ctrl_transport the udp transport object diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index 4c86ca7c8..14a3ae8d6 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -32,8 +32,7 @@ #include #include #include -#include -#include +#include #include #include @@ -84,8 +83,8 @@ private: rx_frontend_core_200::sptr rx_fe; tx_frontend_core_200::sptr tx_fe; std::vector rx_dsps; - std::vector > rx_streamers; - std::vector > tx_streamers; + std::vector > rx_streamers; + std::vector > tx_streamers; tx_dsp_core_200::sptr tx_dsp; time64_core_200::sptr time64; user_settings_core_200::sptr user; diff --git a/host/lib/usrp/x300/x300_adc_ctrl.hpp b/host/lib/usrp/x300/x300_adc_ctrl.hpp index 354b8db49..c69c4c427 100644 --- a/host/lib/usrp/x300/x300_adc_ctrl.hpp +++ b/host/lib/usrp/x300/x300_adc_ctrl.hpp @@ -10,12 +10,12 @@ #include #include -#include +#include class x300_adc_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~x300_adc_ctrl(void) = 0; diff --git a/host/lib/usrp/x300/x300_clock_ctrl.hpp b/host/lib/usrp/x300/x300_clock_ctrl.hpp index 25c2dd33f..af8c3c162 100644 --- a/host/lib/usrp/x300/x300_clock_ctrl.hpp +++ b/host/lib/usrp/x300/x300_clock_ctrl.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include enum x300_clock_which_t { @@ -28,7 +28,7 @@ enum x300_clock_which_t { class x300_clock_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~x300_clock_ctrl(void) = 0; diff --git a/host/lib/usrp/x300/x300_dac_ctrl.hpp b/host/lib/usrp/x300/x300_dac_ctrl.hpp index d73a03d63..9844ffce6 100644 --- a/host/lib/usrp/x300/x300_dac_ctrl.hpp +++ b/host/lib/usrp/x300/x300_dac_ctrl.hpp @@ -10,12 +10,12 @@ #include #include -#include +#include class x300_dac_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~x300_dac_ctrl(void) = 0; diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp index b4dab8291..42d0b32ca 100644 --- a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp +++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include using namespace uhd; @@ -158,5 +158,5 @@ x300_mb_eeprom_iface::~x300_mb_eeprom_iface(void) x300_mb_eeprom_iface::sptr x300_mb_eeprom_iface::make( wb_iface::sptr wb, i2c_iface::sptr i2c) { - return boost::make_shared(wb, i2c->eeprom16()); + return std::make_shared(wb, i2c->eeprom16()); } diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp index d323d6359..2d08d5711 100644 --- a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp +++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp @@ -11,13 +11,13 @@ #include #include #include -#include +#include #include class x300_mb_eeprom_iface : public uhd::i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~x300_mb_eeprom_iface(void) = 0; diff --git a/host/lib/usrp/x300/x300_pcie_mgr.cpp b/host/lib/usrp/x300/x300_pcie_mgr.cpp index 6560f2770..8466a5174 100644 --- a/host/lib/usrp/x300/x300_pcie_mgr.cpp +++ b/host/lib/usrp/x300/x300_pcie_mgr.cpp @@ -58,7 +58,7 @@ using namespace uhd::niusrprio; // We need a zpu xport registry to ensure synchronization between the static // finder method and the instances of the x300_impl class. -typedef std::unordered_map> +typedef std::unordered_map> pcie_zpu_iface_registry_t; UHD_SINGLETON_FCN(pcie_zpu_iface_registry_t, get_pcie_zpu_iface_registry) static std::mutex pcie_zpu_iface_registry_mutex; @@ -249,7 +249,7 @@ wb_iface::sptr pcie_manager::get_ctrl_iface() "Someone else has a ZPU transport to the device open. Internal error!"); } auto zpu_ctrl = x300_make_ctrl_iface_pcie(_rio_fpga_interface->get_kernel_proxy()); - get_pcie_zpu_iface_registry()[_resource] = boost::weak_ptr(zpu_ctrl); + get_pcie_zpu_iface_registry()[_resource] = std::weak_ptr(zpu_ctrl); return zpu_ctrl; } diff --git a/host/lib/usrp/x300/x300_radio_control.cpp b/host/lib/usrp/x300/x300_radio_control.cpp index 6cee57827..8e4351d65 100644 --- a/host/lib/usrp/x300/x300_radio_control.cpp +++ b/host/lib/usrp/x300/x300_radio_control.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -1492,7 +1492,7 @@ private: // create a new dboard manager RFNOC_LOG_TRACE("Creating DB interface..."); - _db_iface = boost::make_shared(db_config); + _db_iface = std::make_shared(db_config); RFNOC_LOG_TRACE("Creating DB manager..."); _db_manager = dboard_manager::make(_db_eeproms[RX_EEPROM_ADDR + DB_OFFSET], _db_eeproms[TX_EEPROM_ADDR + DB_OFFSET], @@ -1889,7 +1889,7 @@ private: //! Reference to DB manager usrp::dboard_manager::sptr _db_manager; //! Reference to DB iface - boost::shared_ptr _db_iface; + std::shared_ptr _db_iface; enum radio_connection_t { PRIMARY, SECONDARY }; radio_connection_t _radio_type; -- cgit v1.2.3