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/examples/benchmark_streamer.cpp | 2 +- host/examples/network_relay.cpp | 16 ++++----- host/examples/rfnoc_radio_loopback.cpp | 2 +- host/examples/txrx_loopback_to_file.cpp | 4 +-- host/include/uhd/convert.hpp | 4 +-- host/include/uhd/device.hpp | 4 +-- host/include/uhd/property_tree.hpp | 16 ++++----- host/include/uhd/property_tree.ipp | 18 +++++----- host/include/uhd/rfnoc/block_id.hpp | 2 +- host/include/uhd/rfnoc/blockdef.hpp | 6 ++-- host/include/uhd/stream.hpp | 6 ++-- host/include/uhd/transport/buffer_pool.hpp | 4 +-- host/include/uhd/transport/muxed_zero_copy_if.hpp | 2 +- host/include/uhd/transport/nirio/nifpga_lvbitx.h | 3 +- host/include/uhd/transport/nirio/nirio_fifo.h | 3 +- .../uhd/transport/nirio/nirio_resource_manager.h | 4 +-- host/include/uhd/transport/nirio/niriok_proxy.h | 11 +++--- .../uhd/transport/nirio/niriok_proxy_impl_v1.h | 1 - .../uhd/transport/nirio/niriok_proxy_impl_v2.h | 1 - .../uhd/transport/nirio/niusrprio_session.h | 11 +++--- .../include/uhd/transport/nirio/rpc/rpc_client.hpp | 4 +-- .../include/uhd/transport/nirio/rpc/rpc_common.hpp | 5 +-- host/include/uhd/transport/nirio_zero_copy.hpp | 4 +-- host/include/uhd/transport/tcp_zero_copy.hpp | 2 +- host/include/uhd/transport/udp_simple.hpp | 4 +-- host/include/uhd/transport/udp_zero_copy.hpp | 4 +-- host/include/uhd/transport/usb_control.hpp | 4 +-- host/include/uhd/transport/usb_device_handle.hpp | 4 +-- host/include/uhd/transport/usb_zero_copy.hpp | 2 +- host/include/uhd/transport/zero_copy.hpp | 4 +-- host/include/uhd/transport/zero_copy_flow_ctrl.hpp | 4 +-- host/include/uhd/types/filters.hpp | 12 +++---- host/include/uhd/types/serial.hpp | 8 ++--- host/include/uhd/types/wb_iface.hpp | 6 ++-- host/include/uhd/usrp/dboard_base.hpp | 4 +-- host/include/uhd/usrp/dboard_iface.hpp | 4 +-- host/include/uhd/usrp/dboard_manager.hpp | 4 +-- host/include/uhd/usrp/gps_ctrl.hpp | 4 +-- host/include/uhd/usrp/multi_usrp.hpp | 4 +-- host/include/uhd/usrp_clock/multi_usrp_clock.hpp | 2 +- host/include/uhd/utils/gain_group.hpp | 4 +-- host/include/uhd/utils/msg_task.hpp | 4 +-- host/include/uhd/utils/pimpl.hpp | 6 ++-- host/include/uhd/utils/soft_register.hpp | 10 +++--- host/include/uhd/utils/tasks.hpp | 9 ++--- .../lib/deps/rpclib/include/rpc/msgpack/unpack.hpp | 4 +-- host/lib/device.cpp | 4 +-- host/lib/experts/expert_container.cpp | 17 +++++---- .../include/uhdlib/experts/expert_container.hpp | 4 +-- .../lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp | 6 ++-- host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp | 4 +-- .../include/uhdlib/transport/dpdk_zero_copy.hpp | 4 +-- .../lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp | 4 +-- .../include/uhdlib/usrp/common/ad936x_manager.hpp | 4 +-- host/lib/include/uhdlib/usrp/common/adf435x.hpp | 2 +- host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp | 4 +-- host/lib/include/uhdlib/usrp/common/max287x.hpp | 2 +- .../uhdlib/usrp/common/recv_packet_demuxer.hpp | 4 +-- .../usrp/common/recv_packet_demuxer_3000.hpp | 6 ++-- .../include/uhdlib/usrp/cores/gpio_atr_3000.hpp | 6 ++-- .../include/uhdlib/usrp/cores/gpio_core_200.hpp | 6 ++-- .../uhdlib/usrp/cores/i2c_core_100_wb32.hpp | 4 +-- .../lib/include/uhdlib/usrp/cores/i2c_core_200.hpp | 4 +-- .../uhdlib/usrp/cores/radio_ctrl_core_3000.hpp | 4 +-- .../include/uhdlib/usrp/cores/rx_dsp_core_200.hpp | 4 +-- .../include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp | 4 +-- .../uhdlib/usrp/cores/rx_frontend_core_200.hpp | 4 +-- .../uhdlib/usrp/cores/rx_frontend_core_3000.hpp | 4 +-- .../uhdlib/usrp/cores/rx_vita_core_3000.hpp | 4 +-- .../include/uhdlib/usrp/cores/spi_core_3000.hpp | 4 +-- .../include/uhdlib/usrp/cores/time64_core_200.hpp | 4 +-- .../include/uhdlib/usrp/cores/time_core_3000.hpp | 4 +-- .../include/uhdlib/usrp/cores/tx_dsp_core_200.hpp | 4 +-- .../include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp | 4 +-- .../uhdlib/usrp/cores/tx_frontend_core_200.hpp | 4 +-- .../uhdlib/usrp/cores/tx_vita_core_3000.hpp | 4 +-- .../uhdlib/usrp/cores/user_settings_core_200.hpp | 4 +-- .../uhdlib/usrp/cores/user_settings_core_3000.hpp | 2 +- host/lib/property_tree.cpp | 16 ++++----- host/lib/rfnoc/graph_stream_manager.cpp | 2 +- host/lib/rfnoc/rfnoc_graph.cpp | 12 +++---- host/lib/transport/dpdk_zero_copy.cpp | 2 +- host/lib/transport/libusb1_base.cpp | 6 ++-- host/lib/transport/libusb1_base.hpp | 14 ++++---- host/lib/transport/libusb1_control.cpp | 2 +- host/lib/transport/libusb1_zero_copy.cpp | 12 +++---- host/lib/transport/muxed_zero_copy_if.cpp | 19 +++++----- host/lib/transport/nirio_zero_copy.cpp | 12 +++---- host/lib/transport/super_recv_packet_handler.hpp | 2 +- host/lib/transport/tcp_zero_copy.cpp | 14 ++++---- host/lib/transport/udp_wsa_zero_copy.cpp | 10 +++--- host/lib/transport/udp_zero_copy.cpp | 12 +++---- host/lib/transport/zero_copy_flow_ctrl.cpp | 16 ++++----- host/lib/types/filters_python.hpp | 2 +- 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 ++-- host/lib/usrp_clock/octoclock/octoclock_impl.hpp | 2 +- host/lib/utils/ihex.cpp | 6 ++-- host/lib/utils/log.cpp | 2 +- host/python/pyuhd.cpp | 5 --- host/tests/common/mock_zero_copy.cpp | 2 +- host/tests/common/mock_zero_copy.hpp | 6 ++-- host/tests/expert_test.cpp | 8 ++--- host/tests/packet_handler_benchmark.cpp | 16 ++++----- host/tests/rx_streamer_test.cpp | 6 ++-- host/tests/sph_recv_test.cpp | 10 +++--- host/tests/streamer_benchmark.cpp | 18 +++++----- host/tests/tx_streamer_test.cpp | 10 +++--- host/utils/latency/responder.cpp | 2 +- 156 files changed, 492 insertions(+), 505 deletions(-) (limited to 'host') diff --git a/host/examples/benchmark_streamer.cpp b/host/examples/benchmark_streamer.cpp index c2f3a4b2c..093d4254f 100644 --- a/host/examples/benchmark_streamer.cpp +++ b/host/examples/benchmark_streamer.cpp @@ -514,7 +514,7 @@ test_results benchmark_tx_streamer(uhd::device3::sptr usrp, const double duration, const std::string& format) { - std::vector> null_ctrls; + std::vector> null_ctrls; for (const auto& id : null_ids) { null_ctrls.push_back(usrp->get_block_ctrl(id)); } diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index bf2ac9255..6de268aa9 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -22,7 +22,7 @@ namespace po = boost::program_options; namespace asio = boost::asio; -typedef boost::shared_ptr socket_type; +typedef std::shared_ptr socket_type; static const size_t insane_mtu = 9000; @@ -81,7 +81,7 @@ public: asio::ip::udp::resolver::query query(asio::ip::udp::v4(), server_addr, port); asio::ip::udp::endpoint endpoint = *resolver.resolve(query); - _server_socket = boost::shared_ptr( + _server_socket = std::shared_ptr( new asio::ip::udp::socket(_io_service, endpoint)); resize_buffs(_server_socket, server_rx_size, server_tx_size); } @@ -90,7 +90,7 @@ public: asio::ip::udp::resolver::query query(asio::ip::udp::v4(), client_addr, port); asio::ip::udp::endpoint endpoint = *resolver.resolve(query); - _client_socket = boost::shared_ptr( + _client_socket = std::shared_ptr( new asio::ip::udp::socket(_io_service)); _client_socket->open(asio::ip::udp::v4()); _client_socket->connect(endpoint); @@ -215,14 +215,14 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) } { - boost::shared_ptr ctrl(new udp_relay_type(bind, addr, "49152")); - boost::shared_ptr rxdsp0(new udp_relay_type( + std::shared_ptr ctrl(new udp_relay_type(bind, addr, "49152")); + std::shared_ptr rxdsp0(new udp_relay_type( bind, addr, "49156", 0, tx_dsp_buff_size, rx_dsp_buff_size, 0)); - boost::shared_ptr txdsp0(new udp_relay_type( + std::shared_ptr txdsp0(new udp_relay_type( bind, addr, "49157", tx_dsp_buff_size, 0, 0, tx_dsp_buff_size)); - boost::shared_ptr rxdsp1(new udp_relay_type( + std::shared_ptr rxdsp1(new udp_relay_type( bind, addr, "49158", 0, tx_dsp_buff_size, rx_dsp_buff_size, 0)); - boost::shared_ptr gps(new udp_relay_type(bind, addr, "49172")); + std::shared_ptr gps(new udp_relay_type(bind, addr, "49172")); std::signal(SIGINT, &sig_int_handler); std::cout << "Press Ctrl + C to stop streaming..." << std::endl; diff --git a/host/examples/rfnoc_radio_loopback.cpp b/host/examples/rfnoc_radio_loopback.cpp index dffe30b3b..707c957e2 100644 --- a/host/examples/rfnoc_radio_loopback.cpp +++ b/host/examples/rfnoc_radio_loopback.cpp @@ -88,7 +88,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) std::cout << std::endl; std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl; - auto dev = boost::dynamic_pointer_cast(uhd::device::make(args)); + auto dev = std::dynamic_pointer_cast(uhd::device::make(args)); if (not dev) { std::cout << "Error: Could not find an RFNoC-compatible device." << std::endl; return EXIT_FAILURE; diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 271d249f6..6199ca429 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -117,10 +117,10 @@ void recv_to_file(uhd::usrp::multi_usrp::sptr usrp, // Create one ofstream object per channel // (use shared_ptr because ofstream is non-copyable) - std::vector> outfiles; + std::vector> outfiles; for (size_t i = 0; i < buffs.size(); i++) { const std::string this_filename = generate_out_filename(file, buffs.size(), i); - outfiles.push_back(boost::shared_ptr( + outfiles.push_back(std::shared_ptr( new std::ofstream(this_filename.c_str(), std::ofstream::binary))); } UHD_ASSERT_THROW(outfiles.size() == buffs.size()); diff --git a/host/include/uhd/convert.hpp b/host/include/uhd/convert.hpp index 3af7cc47b..4d84fcdaa 100644 --- a/host/include/uhd/convert.hpp +++ b/host/include/uhd/convert.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace convert { @@ -21,7 +21,7 @@ namespace uhd { namespace convert { class converter { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::ref_vector output_type; typedef uhd::ref_vector input_type; diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp index 44f74b210..11bedf216 100644 --- a/host/include/uhd/device.hpp +++ b/host/include/uhd/device.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include namespace uhd { @@ -27,7 +27,7 @@ class property_tree; // forward declaration class UHD_API device : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function find_t; typedef boost::function make_t; diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp index d97a5505e..4a839f8e9 100644 --- a/host/include/uhd/property_tree.hpp +++ b/host/include/uhd/property_tree.hpp @@ -12,10 +12,10 @@ #include #include #include -#include -#include +#include #include #include +#include namespace uhd { @@ -215,7 +215,7 @@ UHD_API fs_path operator/(const fs_path&, size_t); class UHD_API property_tree : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum coerce_mode_t { AUTO_COERCE, MANUAL_COERCE }; @@ -246,21 +246,21 @@ public: //! Pop a property off the tree, and returns the property template - boost::shared_ptr > pop(const fs_path& path); + std::shared_ptr > pop(const fs_path& path); private: //! Internal pop function - virtual boost::shared_ptr _pop(const fs_path& path) = 0; + virtual std::shared_ptr _pop(const fs_path& path) = 0; //! Internal create property with wild-card type - virtual void _create(const fs_path& path, const boost::shared_ptr& prop, + virtual void _create(const fs_path& path, const std::shared_ptr& prop, std::type_index prop_type) = 0; //! Internal access property with wild-card type - virtual boost::shared_ptr& _access(const fs_path& path) const = 0; + virtual std::shared_ptr& _access(const fs_path& path) const = 0; //! Internal access property with wild-card type but with type verification - virtual boost::shared_ptr& _access_with_type_check( + virtual std::shared_ptr& _access_with_type_check( const fs_path& path, std::type_index expected_prop_type) const = 0; }; diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp index 20ad43fb1..3bae2a451 100644 --- a/host/include/uhd/property_tree.ipp +++ b/host/include/uhd/property_tree.ipp @@ -11,9 +11,9 @@ #include #include -#include #include #include +#include /*********************************************************************** * Implement templated property impl @@ -147,7 +147,7 @@ private: return value; } - static void init_or_set_value(boost::scoped_ptr& scoped_value, const T& init_val) + static void init_or_set_value(std::unique_ptr& scoped_value, const T& init_val) { if (scoped_value.get() == NULL) { scoped_value.reset(new T(init_val)); @@ -156,7 +156,7 @@ private: } } - static const T& get_value_ref(const boost::scoped_ptr& scoped_value) + static const T& get_value_ref(const std::unique_ptr& scoped_value) { if (scoped_value.get() == NULL) throw uhd::assertion_error("Cannot use uninitialized property data"); @@ -168,8 +168,8 @@ private: std::vector::subscriber_type> _coerced_subscribers; typename property::publisher_type _publisher; typename property::coercer_type _coercer; - boost::scoped_ptr _value; - boost::scoped_ptr _coerced_value; + std::unique_ptr _value; + std::unique_ptr _coerced_value; }; }} // namespace uhd:: @@ -183,7 +183,7 @@ template property& property_tree::create(const fs_path& path, coerce_mode_t coerce_mode) { this->_create(path, - typename boost::shared_ptr >(new property_impl(coerce_mode)), + typename std::shared_ptr >(new property_impl(coerce_mode)), std::type_index(typeid(T))); return this->access(path); } @@ -191,14 +191,14 @@ property& property_tree::create(const fs_path& path, coerce_mode_t coerce_mod template property& property_tree::access(const fs_path& path) { - return *boost::static_pointer_cast >( + return *std::static_pointer_cast >( this->_access_with_type_check(path, std::type_index(typeid(T)))); } template -typename boost::shared_ptr > property_tree::pop(const fs_path& path) +typename std::shared_ptr > property_tree::pop(const fs_path& path) { - return boost::static_pointer_cast >(this->_pop(path)); + return std::static_pointer_cast >(this->_pop(path)); } } // namespace uhd diff --git a/host/include/uhd/rfnoc/block_id.hpp b/host/include/uhd/rfnoc/block_id.hpp index 106fb394f..d15220aa7 100644 --- a/host/include/uhd/rfnoc/block_id.hpp +++ b/host/include/uhd/rfnoc/block_id.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/host/include/uhd/rfnoc/blockdef.hpp b/host/include/uhd/rfnoc/blockdef.hpp index e35c8e234..d6bcec414 100644 --- a/host/include/uhd/rfnoc/blockdef.hpp +++ b/host/include/uhd/rfnoc/blockdef.hpp @@ -11,18 +11,18 @@ #include #include #include -#include #include #include +#include namespace uhd { namespace rfnoc { /*! Reads and stores block definitions for blocks and components. */ -class UHD_API blockdef : public boost::enable_shared_from_this +class UHD_API blockdef : public std::enable_shared_from_this { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; //! Describes port options for a block definition. // diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp index 7abab5b3c..5cbb652d6 100644 --- a/host/include/uhd/stream.hpp +++ b/host/include/uhd/stream.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -170,7 +170,7 @@ struct UHD_API stream_args_t class UHD_API rx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_streamer(void); @@ -248,7 +248,7 @@ public: class UHD_API tx_streamer : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~tx_streamer(void); diff --git a/host/include/uhd/transport/buffer_pool.hpp b/host/include/uhd/transport/buffer_pool.hpp index 53949cbaf..125d5b8e3 100644 --- a/host/include/uhd/transport/buffer_pool.hpp +++ b/host/include/uhd/transport/buffer_pool.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace uhd { namespace transport { @@ -21,7 +21,7 @@ namespace uhd { namespace transport { class UHD_API buffer_pool : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef void* ptr_type; virtual ~buffer_pool(void) = 0; diff --git a/host/include/uhd/transport/muxed_zero_copy_if.hpp b/host/include/uhd/transport/muxed_zero_copy_if.hpp index d8230aaf9..61086fbba 100644 --- a/host/include/uhd/transport/muxed_zero_copy_if.hpp +++ b/host/include/uhd/transport/muxed_zero_copy_if.hpp @@ -28,7 +28,7 @@ namespace uhd { namespace transport { class muxed_zero_copy_if : private uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Function to classify the stream based on the payload. diff --git a/host/include/uhd/transport/nirio/nifpga_lvbitx.h b/host/include/uhd/transport/nirio/nifpga_lvbitx.h index 1b27b67e0..a66e8fcc3 100644 --- a/host/include/uhd/transport/nirio/nifpga_lvbitx.h +++ b/host/include/uhd/transport/nirio/nifpga_lvbitx.h @@ -10,13 +10,12 @@ #include #include -#include namespace uhd { namespace niusrprio { class UHD_API nifpga_lvbitx { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~nifpga_lvbitx() {}; diff --git a/host/include/uhd/transport/nirio/nirio_fifo.h b/host/include/uhd/transport/nirio/nirio_fifo.h index 317ca777d..405e6c41d 100644 --- a/host/include/uhd/transport/nirio/nirio_fifo.h +++ b/host/include/uhd/transport/nirio/nirio_fifo.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,7 @@ template class nirio_fifo : private uhd::noncopyable { public: - typedef boost::shared_ptr< nirio_fifo > sptr; + typedef std::shared_ptr< nirio_fifo > sptr; typedef enum { MINIMIZE_LATENCY, diff --git a/host/include/uhd/transport/nirio/nirio_resource_manager.h b/host/include/uhd/transport/nirio/nirio_resource_manager.h index de9c5f3fc..e1562419f 100644 --- a/host/include/uhd/transport/nirio/nirio_resource_manager.h +++ b/host/include/uhd/transport/nirio/nirio_resource_manager.h @@ -58,7 +58,7 @@ public: nirio_status get_register_offset(const char* register_name, uint32_t& offset); template - nirio_status create_tx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo >& fifo) + nirio_status create_tx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo >& fifo) { nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name); if (fifo_info_ptr) { @@ -74,7 +74,7 @@ public: } template - nirio_status create_rx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo >& fifo) + nirio_status create_rx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo >& fifo) { nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name); if (fifo_info_ptr) { diff --git a/host/include/uhd/transport/nirio/niriok_proxy.h b/host/include/uhd/transport/nirio/niriok_proxy.h index 8bd877e30..13cf172fa 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy.h +++ b/host/include/uhd/transport/nirio/niriok_proxy.h @@ -8,13 +8,12 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include #define NI_VENDOR_NUM 0x1093 @@ -135,7 +134,7 @@ namespace uhd { namespace niusrprio class UHD_API niriok_proxy : public uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make_and_open(const std::string& interface_path); diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h index edeadc34d..b659cffab 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h +++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h @@ -8,7 +8,6 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H -#include #include #include #include diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h index 31013fbfc..0f49749de 100644 --- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h +++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h @@ -8,7 +8,6 @@ #ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H #define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H -#include #include #include #include diff --git a/host/include/uhd/transport/nirio/niusrprio_session.h b/host/include/uhd/transport/nirio/niusrprio_session.h index 2154c41f1..2fff0ac36 100644 --- a/host/include/uhd/transport/nirio/niusrprio_session.h +++ b/host/include/uhd/transport/nirio/niusrprio_session.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -24,7 +23,7 @@ namespace uhd { namespace niusrprio { class UHD_API niusrprio_session : private uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::usrprio_rpc::usrprio_device_info device_info; typedef uhd::usrprio_rpc::usrprio_device_info_vtr device_info_vtr; @@ -42,7 +41,7 @@ public: template nirio_status create_tx_fifo( - const char* fifo_name, boost::shared_ptr>& fifo) + const char* fifo_name, std::shared_ptr>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -51,7 +50,7 @@ public: template nirio_status create_tx_fifo( - uint32_t fifo_instance, boost::shared_ptr>& fifo) + uint32_t fifo_instance, std::shared_ptr>& fifo) { if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count()) return NiRio_Status_InvalidParameter; @@ -60,7 +59,7 @@ public: template nirio_status create_rx_fifo( - const char* fifo_name, boost::shared_ptr>& fifo) + const char* fifo_name, std::shared_ptr>& fifo) { if (!_session_open) return NiRio_Status_ResourceNotInitialized; @@ -69,7 +68,7 @@ public: template nirio_status create_rx_fifo( - uint32_t fifo_instance, boost::shared_ptr>& fifo) + uint32_t fifo_instance, std::shared_ptr>& fifo) { if ((size_t)fifo_instance >= _lvbitx->get_input_fifo_count()) return NiRio_Status_InvalidParameter; diff --git a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp index 80ba20320..04f560e6a 100644 --- a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp +++ b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp @@ -12,9 +12,9 @@ #include #include #include -#include #include #include +#include namespace uhd { namespace usrprio_rpc { @@ -68,7 +68,7 @@ private: // Services boost::asio::io_service _io_service; - boost::scoped_ptr _io_service_thread; + std::unique_ptr _io_service_thread; boost::asio::ip::tcp::socket _socket; // Handshake info hshake_args_t _hshake_args_client; diff --git a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp index 2384c0f61..9be1d024c 100644 --- a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp +++ b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp @@ -22,6 +22,7 @@ # include #endif #include +#include namespace uhd { namespace usrprio_rpc { @@ -131,9 +132,9 @@ public: private: std::istringstream _stream; #if (USE_BINARY_ARCHIVE) - boost::scoped_ptr _archive; + std::unique_ptr _archive; #else - boost::scoped_ptr _archive; + std::unique_ptr _archive; #endif }; diff --git a/host/include/uhd/transport/nirio_zero_copy.hpp b/host/include/uhd/transport/nirio_zero_copy.hpp index b5e4dea38..096f592a8 100644 --- a/host/include/uhd/transport/nirio_zero_copy.hpp +++ b/host/include/uhd/transport/nirio_zero_copy.hpp @@ -13,14 +13,14 @@ #include #include #include -#include +#include namespace uhd { namespace transport { class UHD_API nirio_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make(uhd::niusrprio::niusrprio_session::sptr fpga_session, const uint32_t instance, diff --git a/host/include/uhd/transport/tcp_zero_copy.hpp b/host/include/uhd/transport/tcp_zero_copy.hpp index 4db68cec8..b1d052513 100644 --- a/host/include/uhd/transport/tcp_zero_copy.hpp +++ b/host/include/uhd/transport/tcp_zero_copy.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { diff --git a/host/include/uhd/transport/udp_simple.hpp b/host/include/uhd/transport/udp_simple.hpp index a936cb204..52395d544 100644 --- a/host/include/uhd/transport/udp_simple.hpp +++ b/host/include/uhd/transport/udp_simple.hpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include namespace uhd { namespace transport { class UHD_API udp_simple : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~udp_simple(void) = 0; diff --git a/host/include/uhd/transport/udp_zero_copy.hpp b/host/include/uhd/transport/udp_zero_copy.hpp index 2fedad99a..3fb3fc396 100644 --- a/host/include/uhd/transport/udp_zero_copy.hpp +++ b/host/include/uhd/transport/udp_zero_copy.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { @@ -34,7 +34,7 @@ public: size_t send_buff_size; }; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a new zero copy udp transport: diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp index fb37dc9fe..a6ad1e1c9 100644 --- a/host/include/uhd/transport/usb_control.hpp +++ b/host/include/uhd/transport/usb_control.hpp @@ -10,14 +10,14 @@ #include #include -#include +#include namespace uhd { namespace transport { class UHD_API usb_control : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usb_control(void); diff --git a/host/include/uhd/transport/usb_device_handle.hpp b/host/include/uhd/transport/usb_device_handle.hpp index a4eeae510..b0dea1b77 100644 --- a/host/include/uhd/transport/usb_device_handle.hpp +++ b/host/include/uhd/transport/usb_device_handle.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ namespace uhd { namespace transport { class UHD_API usb_device_handle : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef std::pair vid_pid_pair_t; virtual ~usb_device_handle(void); diff --git a/host/include/uhd/transport/usb_zero_copy.hpp b/host/include/uhd/transport/usb_zero_copy.hpp index d78807768..ecb3ff148 100644 --- a/host/include/uhd/transport/usb_zero_copy.hpp +++ b/host/include/uhd/transport/usb_zero_copy.hpp @@ -27,7 +27,7 @@ namespace uhd { namespace transport { class UHD_API usb_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~usb_zero_copy(void); diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp index c59213e92..a28398445 100644 --- a/host/include/uhd/transport/zero_copy.hpp +++ b/host/include/uhd/transport/zero_copy.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace transport { @@ -148,7 +148,7 @@ struct zero_copy_xport_params class UHD_API zero_copy_if : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Clean up tasks before releasing the transport object. diff --git a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp index f98a0891c..f12aed2a9 100644 --- a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp +++ b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace uhd { namespace transport { @@ -28,7 +28,7 @@ typedef boost::function flow_ctrl_func; class UHD_API zero_copy_flow_ctrl : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make flow controlled transport. diff --git a/host/include/uhd/types/filters.hpp b/host/include/uhd/types/filters.hpp index ff72dd5e3..d15002c0e 100644 --- a/host/include/uhd/types/filters.hpp +++ b/host/include/uhd/types/filters.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ namespace uhd { class UHD_API filter_info_base { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum filter_type { ANALOG_LOW_PASS, ANALOG_BAND_PASS, DIGITAL_I16, DIGITAL_FIR_I16 }; filter_info_base(filter_type type, bool bypass, size_t position_index) @@ -63,7 +63,7 @@ class UHD_API analog_filter_base : public filter_info_base std::string _analog_type; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; analog_filter_base(filter_type type, bool bypass, size_t position_index, @@ -87,7 +87,7 @@ class UHD_API analog_filter_lp : public analog_filter_base double _rolloff; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; analog_filter_lp(filter_type type, bool bypass, size_t position_index, @@ -130,7 +130,7 @@ protected: std::vector _taps; public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; digital_filter_base(filter_type type, bool bypass, size_t position_index, @@ -208,7 +208,7 @@ template class UHD_API digital_filter_fir : public digital_filter_base { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; digital_filter_fir(filter_info_base::filter_type type, bool bypass, diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index 82d2f6070..a34baf5eb 100644 --- a/host/include/uhd/types/serial.hpp +++ b/host/include/uhd/types/serial.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ typedef std::vector byte_vector_t; class UHD_API i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~i2c_iface(void); @@ -115,7 +115,7 @@ struct UHD_API spi_config_t class UHD_API spi_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~spi_iface(void); @@ -162,7 +162,7 @@ public: class UHD_API uart_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~uart_iface(void); diff --git a/host/include/uhd/types/wb_iface.hpp b/host/include/uhd/types/wb_iface.hpp index 495762118..2b7a6d4c5 100644 --- a/host/include/uhd/types/wb_iface.hpp +++ b/host/include/uhd/types/wb_iface.hpp @@ -11,14 +11,14 @@ #include #include #include -#include +#include namespace uhd { class UHD_API wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uint32_t wb_addr_type; virtual ~wb_iface(void); @@ -69,7 +69,7 @@ public: class UHD_API timed_wb_iface : public wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Get the command time. diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp index 25f5b816d..9575e6bc9 100644 --- a/host/include/uhd/usrp/dboard_base.hpp +++ b/host/include/uhd/usrp/dboard_base.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace usrp { @@ -25,7 +25,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_base : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * An opaque type for the dboard constructor args. * Derived classes should pass the args into the base class, diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index 162d0c6a3..9a25fb607 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ struct UHD_API dboard_iface_special_props_t class UHD_API dboard_iface : public uhd::i2c_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef dboard_iface_special_props_t special_props_t; //! tells the host which unit to use diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index eb255c346..737c24add 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -27,7 +27,7 @@ namespace uhd { namespace usrp { class UHD_API dboard_manager : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; // dboard constructor (each dboard should have a ::make with this signature) typedef dboard_base::sptr (*dboard_ctor_t)(dboard_base::ctor_args_t); diff --git a/host/include/uhd/usrp/gps_ctrl.hpp b/host/include/uhd/usrp/gps_ctrl.hpp index a3485226c..7743894c1 100644 --- a/host/include/uhd/usrp/gps_ctrl.hpp +++ b/host/include/uhd/usrp/gps_ctrl.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include namespace uhd { @@ -19,7 +19,7 @@ namespace uhd { class UHD_API gps_ctrl : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~gps_ctrl(void) = 0; diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 99a966b7a..27b5f3d9a 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ namespace usrp { class UHD_API multi_usrp : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~multi_usrp(void) = 0; diff --git a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp index 48f8a5eae..6faa10714 100644 --- a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp +++ b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp @@ -45,7 +45,7 @@ namespace uhd { namespace usrp_clock { class UHD_API multi_usrp_clock : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~multi_usrp_clock(void) = 0; diff --git a/host/include/uhd/utils/gain_group.hpp b/host/include/uhd/utils/gain_group.hpp index 69cd9dc6b..8fe69441f 100644 --- a/host/include/uhd/utils/gain_group.hpp +++ b/host/include/uhd/utils/gain_group.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ struct UHD_API gain_fcns_t class UHD_API gain_group : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~gain_group(void) = 0; diff --git a/host/include/uhd/utils/msg_task.hpp b/host/include/uhd/utils/msg_task.hpp index 4e73b7720..fd08523f7 100644 --- a/host/include/uhd/utils/msg_task.hpp +++ b/host/include/uhd/utils/msg_task.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -21,7 +21,7 @@ namespace uhd { class UHD_API msg_task : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef std::vector msg_payload_t; typedef std::pair msg_type_t; typedef boost::function(void)> task_fcn_type; diff --git a/host/include/uhd/utils/pimpl.hpp b/host/include/uhd/utils/pimpl.hpp index a19f4ddc2..b0fbf7fec 100644 --- a/host/include/uhd/utils/pimpl.hpp +++ b/host/include/uhd/utils/pimpl.hpp @@ -9,7 +9,7 @@ #define INCLUDED_UHD_UTILS_PIMPL_HPP #include -#include +#include /*! \file pimpl.hpp * "Pimpl idiom" (pointer to implementation idiom). @@ -31,7 +31,7 @@ */ #define UHD_PIMPL_DECL(_name) \ struct _name; \ - boost::shared_ptr<_name> + std::shared_ptr<_name> /*! * Make an instance of a pimpl in a source file. @@ -40,6 +40,6 @@ * \param _name the name of the pimpl class * \param _args the constructor args for the pimpl */ -#define UHD_PIMPL_MAKE(_name, _args) boost::shared_ptr<_name>(new _name _args) +#define UHD_PIMPL_MAKE(_name, _args) std::shared_ptr<_name>(new _name _args) #endif /* INCLUDED_UHD_UTILS_PIMPL_HPP */ diff --git a/host/include/uhd/utils/soft_register.hpp b/host/include/uhd/utils/soft_register.hpp index b6897551f..ba716b206 100644 --- a/host/include/uhd/utils/soft_register.hpp +++ b/host/include/uhd/utils/soft_register.hpp @@ -138,7 +138,7 @@ template class UHD_API soft_register_t : public soft_register_base { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; // Reserved field. Represents all bits in the register. UHD_DEFINE_SOFT_REG_FIELD(REGISTER, sizeof(reg_data_t) * 8, 0); //[WIDTH-1:0] @@ -312,7 +312,7 @@ class UHD_API soft_register_sync_t : public soft_register_t { public: - typedef boost::shared_ptr > sptr; + typedef std::shared_ptr > sptr; soft_register_sync_t(wb_iface::wb_addr_type wr_addr, wb_iface::wb_addr_type rd_addr, @@ -428,7 +428,7 @@ typedef soft_register_sync_t soft_reg64_rw_sync_t; reg_obj.initialize(iface); reg_obj.write(example_reg_t::FIELD2, 0x1234); - example_reg_t::sptr reg_sptr = boost::make_shared(); + example_reg_t::sptr reg_sptr = std::make_shared(); reg_obj->initialize(iface); reg_obj->write(example_reg_t::FIELD2, 0x1234); } @@ -444,7 +444,7 @@ namespace uhd { class UHD_API soft_regmap_accessor_t { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~soft_regmap_accessor_t(){}; virtual soft_register_base& lookup(const std::string& path) const = 0; @@ -587,7 +587,7 @@ private: class UHD_API soft_regmap_db_t : public soft_regmap_accessor_t, public uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Use the default constructor if this is the top-level DB diff --git a/host/include/uhd/utils/tasks.hpp b/host/include/uhd/utils/tasks.hpp index fdb3869ee..eaee3edbe 100644 --- a/host/include/uhd/utils/tasks.hpp +++ b/host/include/uhd/utils/tasks.hpp @@ -1,7 +1,8 @@ // // Copyright 2011-2012 Ettus Research LLC -// Copyright 2018 Ettus Research, a National Instruments Company // Copyright 2017 Ettus Research (National Instruments Corp.) +// Copyright 2018 Ettus Research, a National Instruments Company +// Copyright 2019 Ettus Research, a National Instruments Brand // // SPDX-License-Identifier: GPL-3.0-or-later // @@ -12,15 +13,15 @@ #include #include #include -#include -#include +#include +#include namespace uhd { class UHD_API task : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function task_fcn_type; /*! diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp b/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp index 4e00453c8..c407a0967 100644 --- a/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp +++ b/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp @@ -1050,8 +1050,8 @@ public: // std::auto_ptr z = result.zone(); // on_message(obj, z); // - // //// boost::shared_ptr is also usable: - // // boost::shared_ptr life(z.release()); + // //// std::shared_ptr is also usable: + // // std::shared_ptr life(z.release()); // // on_message(result.get(), life); // } // diff --git a/host/lib/device.cpp b/host/lib/device.cpp index d2d98718e..c17713bbd 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -15,12 +15,12 @@ #include #include -#include #include #include #include #include +#include using namespace uhd; @@ -172,7 +172,7 @@ device::sptr device::make(const device_addr_t &hint, device_filter_t filter, siz } //map device address hash to created devices - static uhd::dict > hash_to_device; + static uhd::dict > hash_to_device; //try to find an existing device if (hash_to_device.has_key(dev_hash) and not hash_to_device[dev_hash].expired()){ diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp index 1cdc7841b..33412cb6f 100644 --- a/host/lib/experts/expert_container.cpp +++ b/host/lib/experts/expert_container.cpp @@ -5,20 +5,19 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include #include #include +#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include #include +#include #include -#include +#include +#include +#include #ifdef UHD_EXPERT_LOGGING #define EX_LOG(depth, str) _log(depth, str) @@ -517,7 +516,7 @@ private: expert_container::sptr expert_container::make(const std::string& name) { - return boost::make_shared(name); + return std::make_shared(name); } }} diff --git a/host/lib/include/uhdlib/experts/expert_container.hpp b/host/lib/include/uhdlib/experts/expert_container.hpp index 5c8df5f1a..da52f6f4a 100644 --- a/host/lib/include/uhdlib/experts/expert_container.hpp +++ b/host/lib/include/uhdlib/experts/expert_container.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include namespace uhd { namespace experts { @@ -25,7 +25,7 @@ namespace uhd { namespace experts { class UHD_API expert_container : private uhd::noncopyable, public node_retriever_t { public: //Methods - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~expert_container() {}; diff --git a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp index 55153c229..9a5dd39f4 100644 --- a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp +++ b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp @@ -10,11 +10,11 @@ #include #include #include -#include +#include //! Convenience macro to generate a reg_iface_adapter from within an RFNoC block #define RFNOC_MAKE_WB_IFACE(BASE_OFFSET, CHAN) \ - boost::make_shared( \ + std::make_shared( \ [this]() -> register_iface& { return regs(); }, \ [this, chan = CHAN]() { return get_command_time(chan); }, \ [this, chan = CHAN]( \ @@ -28,7 +28,7 @@ namespace uhd { namespace rfnoc { * From within a noc_block_base derivative, this call will work to create a * wb_iface: * - * wb_iface::sptr ctrl = boost::make_shared( + * wb_iface::sptr ctrl = std::make_shared( * [this]() -> register_iface& { return regs(); }, offset); * * Or you use the macro: diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp index cbb9aa120..42872ba43 100644 --- a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp +++ b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace uhd { namespace rfnoc { namespace detail { @@ -21,7 +21,7 @@ namespace uhd { namespace rfnoc { namespace detail { class rfnoc_device : public uhd::device { public: - using sptr = boost::shared_ptr; // FIXME make std::shared_ptr when + using sptr = std::shared_ptr; // FIXME make std::shared_ptr when // uhd::device is ready rfnoc_device() diff --git a/host/lib/include/uhdlib/transport/dpdk_zero_copy.hpp b/host/lib/include/uhdlib/transport/dpdk_zero_copy.hpp index 8dcce6eee..3497f0598 100644 --- a/host/lib/include/uhdlib/transport/dpdk_zero_copy.hpp +++ b/host/lib/include/uhdlib/transport/dpdk_zero_copy.hpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include @@ -21,7 +21,7 @@ namespace uhd { namespace transport { */ class dpdk_zero_copy : public virtual zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make( const struct uhd_dpdk_ctx &ctx, diff --git a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp index 99d74d80f..955da7c62 100644 --- a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp +++ b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ namespace uhd { namespace usrp { class ad9361_ctrl : public uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~ad9361_ctrl(void) {} diff --git a/host/lib/include/uhdlib/usrp/common/ad936x_manager.hpp b/host/lib/include/uhdlib/usrp/common/ad936x_manager.hpp index 7abbe69ed..2d21d55e7 100644 --- a/host/lib/include/uhdlib/usrp/common/ad936x_manager.hpp +++ b/host/lib/include/uhdlib/usrp/common/ad936x_manager.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include @@ -29,7 +29,7 @@ namespace uhd { namespace usrp { class ad936x_manager { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static const double DEFAULT_GAIN; static const double DEFAULT_BANDWIDTH; diff --git a/host/lib/include/uhdlib/usrp/common/adf435x.hpp b/host/lib/include/uhdlib/usrp/common/adf435x.hpp index 056290451..6f654bcbb 100644 --- a/host/lib/include/uhdlib/usrp/common/adf435x.hpp +++ b/host/lib/include/uhdlib/usrp/common/adf435x.hpp @@ -23,7 +23,7 @@ class adf435x_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function)> write_fn_t; static sptr make_adf4350(write_fn_t write); diff --git a/host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp b/host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp index 6aafa885b..8579787f4 100644 --- a/host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp +++ b/host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp @@ -11,7 +11,7 @@ #include #include //i2c iface #include -#include +#include #define FL_BEGIN 0 #define FL_END 2 @@ -34,7 +34,7 @@ namespace uhd{ namespace usrp{ class fx2_ctrl : uhd::noncopyable, public uhd::i2c_iface{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; /*! * Make a usrp control object from a control transport diff --git a/host/lib/include/uhdlib/usrp/common/max287x.hpp b/host/lib/include/uhdlib/usrp/common/max287x.hpp index 92bc31630..51c22c5d8 100644 --- a/host/lib/include/uhdlib/usrp/common/max287x.hpp +++ b/host/lib/include/uhdlib/usrp/common/max287x.hpp @@ -30,7 +30,7 @@ class max287x_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef boost::function)> write_fn; diff --git a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer.hpp b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer.hpp index d158a919e..c61e0ba99 100644 --- a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer.hpp +++ b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer.hpp @@ -10,14 +10,14 @@ #include #include -#include +#include #include namespace uhd{ namespace usrp{ class recv_packet_demuxer{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~recv_packet_demuxer(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp index 54ae10908..bb5b070c5 100644 --- a/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp +++ b/host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -22,9 +22,9 @@ namespace uhd{ namespace usrp{ - struct recv_packet_demuxer_3000 : boost::enable_shared_from_this + struct recv_packet_demuxer_3000 : std::enable_shared_from_this { - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static sptr make(transport::zero_copy_if::sptr xport) { return sptr(new recv_packet_demuxer_3000(xport)); diff --git a/host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp b/host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp index 2ab0cf4cf..ad7d4b588 100644 --- a/host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp @@ -14,14 +14,14 @@ #include #include #include -#include +#include namespace uhd { namespace usrp { namespace gpio_atr { class gpio_atr_3000 : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static const uint32_t MASK_SET_ALL = 0xFFFFFFFF; @@ -118,7 +118,7 @@ public: class db_gpio_atr_3000 { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::usrp::dboard_iface::unit_t db_unit_t; diff --git a/host/lib/include/uhdlib/usrp/cores/gpio_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/gpio_core_200.hpp index 24c09c113..d6f104be1 100644 --- a/host/lib/include/uhdlib/usrp/cores/gpio_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/gpio_core_200.hpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include #include #include #include class gpio_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::usrp::dboard_iface::unit_t unit_t; typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t; @@ -58,7 +58,7 @@ public: //! Simple wrapper for 32 bit write only class gpio_core_200_32wo : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t; diff --git a/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp b/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp index 266f3e44a..42e57ca16 100644 --- a/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp +++ b/host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp @@ -12,11 +12,11 @@ #include #include #include -#include +#include class i2c_core_100_wb32 : uhd::noncopyable, public uhd::i2c_iface{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~i2c_core_100_wb32(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp index f6c47f4bd..6d987b68a 100644 --- a/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp @@ -12,12 +12,12 @@ #include #include #include -#include +#include #include class i2c_core_200 : uhd::noncopyable, public uhd::i2c_iface{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~i2c_core_200(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp index f7be7ef91..427a72586 100644 --- a/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -22,7 +22,7 @@ class radio_ctrl_core_3000 : public uhd::timed_wb_iface { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~radio_ctrl_core_3000(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_200.hpp index ccf421c06..240838495 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_200.hpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include #include #include #include class rx_dsp_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_dsp_core_200(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp index 8dbeab34f..f89d78191 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include class rx_dsp_core_3000 : uhd::noncopyable @@ -26,7 +26,7 @@ public: static const double DEFAULT_DDS_FREQ; static const double DEFAULT_RATE; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_dsp_core_3000(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_200.hpp index bfba94b10..6a91f83da 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_200.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -22,7 +22,7 @@ public: static const bool DEFAULT_DC_OFFSET_ENABLE; static const std::complex DEFAULT_IQ_BALANCE_VALUE; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_frontend_core_200(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp index 2d20c63fa..b1dfd307e 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -24,7 +24,7 @@ public: static const bool DEFAULT_DC_OFFSET_ENABLE; static const std::complex DEFAULT_IQ_BALANCE_VALUE; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_frontend_core_3000(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/rx_vita_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/rx_vita_core_3000.hpp index 7205e3b5f..615ca2319 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_vita_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_vita_core_3000.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -20,7 +20,7 @@ class rx_vita_core_3000 : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~rx_vita_core_3000(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp index 36486b5a1..4d08071f7 100644 --- a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include #include #include class spi_core_3000 : uhd::noncopyable, public uhd::spi_iface { public: - using sptr = boost::shared_ptr; + using sptr = std::shared_ptr; using poke32_fn_t = std::function; using peek32_fn_t = std::function; diff --git a/host/lib/include/uhdlib/usrp/cores/time64_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/time64_core_200.hpp index 883a83edb..4001d7d4d 100644 --- a/host/lib/include/uhdlib/usrp/cores/time64_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/time64_core_200.hpp @@ -13,13 +13,13 @@ #include #include #include -#include +#include #include #include class time64_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; struct readback_bases_type{ size_t rb_hi_now, rb_lo_now; diff --git a/host/lib/include/uhdlib/usrp/cores/time_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/time_core_3000.hpp index 1f3fa8129..8031ed130 100644 --- a/host/lib/include/uhdlib/usrp/cores/time_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/time_core_3000.hpp @@ -11,13 +11,13 @@ #include #include #include -#include +#include #include class time_core_3000 : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; struct readback_bases_type { diff --git a/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_200.hpp index 6ddbf9fbd..86a704c66 100644 --- a/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_200.hpp @@ -12,12 +12,12 @@ #include #include #include -#include +#include #include class tx_dsp_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~tx_dsp_core_200(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp index c7cf07b6a..5dbded392 100644 --- a/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include class tx_dsp_core_3000 : uhd::noncopyable { @@ -23,7 +23,7 @@ public: static const double DEFAULT_DDS_FREQ; static const double DEFAULT_RATE; - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~tx_dsp_core_3000(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/tx_frontend_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/tx_frontend_core_200.hpp index ae071c715..8a7178bb4 100644 --- a/host/lib/include/uhdlib/usrp/cores/tx_frontend_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/tx_frontend_core_200.hpp @@ -12,13 +12,13 @@ #include #include #include -#include +#include #include #include class tx_frontend_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; static const std::complex DEFAULT_DC_OFFSET_VALUE; static const std::complex DEFAULT_IQ_BALANCE_VALUE; diff --git a/host/lib/include/uhdlib/usrp/cores/tx_vita_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/tx_vita_core_3000.hpp index 57d27d6b3..9d03549de 100644 --- a/host/lib/include/uhdlib/usrp/cores/tx_vita_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/tx_vita_core_3000.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -20,7 +20,7 @@ class tx_vita_core_3000 : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; enum fc_monitor_loc { FC_DEFAULT, diff --git a/host/lib/include/uhdlib/usrp/cores/user_settings_core_200.hpp b/host/lib/include/uhdlib/usrp/cores/user_settings_core_200.hpp index e466e6e44..810c8fd7e 100644 --- a/host/lib/include/uhdlib/usrp/cores/user_settings_core_200.hpp +++ b/host/lib/include/uhdlib/usrp/cores/user_settings_core_200.hpp @@ -12,11 +12,11 @@ #include #include #include -#include +#include class user_settings_core_200 : uhd::noncopyable{ public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; typedef std::pair user_reg_t; virtual ~user_settings_core_200(void) = 0; diff --git a/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp index bc281e396..4b6d0bd6c 100644 --- a/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include class user_settings_core_3000 : public uhd::wb_iface { diff --git a/host/lib/property_tree.cpp b/host/lib/property_tree.cpp index 6f797bc2e..599f610ad 100644 --- a/host/lib/property_tree.cpp +++ b/host/lib/property_tree.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ class property_tree_impl : public uhd::property_tree public: property_tree_impl(const fs_path& root = fs_path()) : _root(root) { - _guts = boost::make_shared(); + _guts = std::make_shared(); } sptr subtree(const fs_path& path_) const @@ -134,7 +134,7 @@ public: return node->keys(); } - boost::shared_ptr _pop(const fs_path& path_) + std::shared_ptr _pop(const fs_path& path_) { const fs_path path = _root / path_; boost::mutex::scoped_lock lock(_guts->mutex); @@ -157,7 +157,7 @@ public: return prop; } - void _create(const fs_path& path_, const boost::shared_ptr& prop, + void _create(const fs_path& path_, const std::shared_ptr& prop, std::type_index prop_type) { const fs_path path = _root / path_; @@ -176,7 +176,7 @@ public: node->prop_type_hash = prop_type.hash_code(); } - boost::shared_ptr& _access(const fs_path& path_) const + std::shared_ptr& _access(const fs_path& path_) const { const fs_path path = _root / path_; boost::mutex::scoped_lock lock(_guts->mutex); @@ -192,7 +192,7 @@ public: return node->prop; } - boost::shared_ptr& _access_with_type_check( + std::shared_ptr& _access_with_type_check( const fs_path& path_, std::type_index expected_prop_type) const { const fs_path path = _root / path_; @@ -220,7 +220,7 @@ private: // basic structural node element struct node_type : uhd::dict { - boost::shared_ptr prop; + std::shared_ptr prop; std::size_t prop_type_hash; }; @@ -232,7 +232,7 @@ private: }; // members, the tree and root prefix - boost::shared_ptr _guts; + std::shared_ptr _guts; const fs_path _root; }; diff --git a/host/lib/rfnoc/graph_stream_manager.cpp b/host/lib/rfnoc/graph_stream_manager.cpp index dcfa88f32..dba913998 100644 --- a/host/lib/rfnoc/graph_stream_manager.cpp +++ b/host/lib/rfnoc/graph_stream_manager.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index a6ec59d01..929ce518d 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -19,8 +19,6 @@ #include #include #include -#include -#include // FIXME remove when rfnoc_device is ready #include using namespace uhd; @@ -215,7 +213,7 @@ public: uhd::transport::adapter_id_t adapter_id) { // Verify the streamer was created by us - auto rfnoc_streamer = boost::dynamic_pointer_cast(streamer); + auto rfnoc_streamer = std::dynamic_pointer_cast(streamer); if (!rfnoc_streamer) { throw uhd::type_error("Streamer is not rfnoc capable"); } @@ -271,7 +269,7 @@ public: uhd::transport::adapter_id_t adapter_id) { // Verify the streamer was created by us - auto rfnoc_streamer = boost::dynamic_pointer_cast(streamer); + auto rfnoc_streamer = std::dynamic_pointer_cast(streamer); if (!rfnoc_streamer) { throw uhd::type_error("Streamer is not rfnoc capable"); } @@ -323,14 +321,14 @@ public: uhd::rx_streamer::sptr create_rx_streamer( const size_t num_chans, const uhd::stream_args_t& args) { - _rx_streamers.push_back(boost::make_shared(num_chans, args)); + _rx_streamers.push_back(std::make_shared(num_chans, args)); return _rx_streamers.back(); } uhd::tx_streamer::sptr create_tx_streamer( const size_t num_chans, const uhd::stream_args_t& args) { - _tx_streamers.push_back(boost::make_shared(num_chans, args)); + _tx_streamers.push_back(std::make_shared(num_chans, args)); return _tx_streamers.back(); } @@ -905,7 +903,7 @@ rfnoc_graph::sptr make_rfnoc_graph( rfnoc_graph::sptr rfnoc_graph::make(const uhd::device_addr_t& device_addr) { auto dev = - boost::dynamic_pointer_cast(uhd::device::make(device_addr)); + std::dynamic_pointer_cast(uhd::device::make(device_addr)); if (!dev) { throw uhd::key_error(std::string("No RFNoC devices found for ----->\n") + device_addr.to_pp_string()); diff --git a/host/lib/transport/dpdk_zero_copy.cpp b/host/lib/transport/dpdk_zero_copy.cpp index a6a158762..99df3b059 100644 --- a/host/lib/transport/dpdk_zero_copy.cpp +++ b/host/lib/transport/dpdk_zero_copy.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index d383b0a3e..03ab51770 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -13,10 +13,10 @@ #include #include #include -#include #include #include #include +#include using namespace uhd; using namespace uhd::transport; @@ -86,7 +86,7 @@ libusb_session_impl::~libusb_session_impl(void) libusb::session::sptr libusb::session::get_global_session(void) { - static boost::weak_ptr global_session; + static std::weak_ptr global_session; // this mutex is to ensure a global session is not currently being created // before checking for the existence of one static std::mutex global_session_mutex; @@ -336,7 +336,7 @@ libusb_device_handle_impl::~libusb_device_handle_impl(void) libusb::device_handle::sptr libusb::device_handle::get_cached_handle(device::sptr dev) { - static uhd::dict> handles; + static uhd::dict> handles; // lock for atomic access to static table above static boost::mutex mutex; diff --git a/host/lib/transport/libusb1_base.hpp b/host/lib/transport/libusb1_base.hpp index deb535ecb..5d909a664 100644 --- a/host/lib/transport/libusb1_base.hpp +++ b/host/lib/transport/libusb1_base.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include //! Define LIBUSB_CALL when its missing (non-windows) @@ -52,7 +52,7 @@ namespace uhd { namespace transport { namespace libusb { class session : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~session(void); @@ -78,7 +78,7 @@ public: class device : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~device(void); @@ -93,7 +93,7 @@ public: class device_list : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~device_list(void); @@ -113,7 +113,7 @@ public: class device_descriptor : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~device_descriptor(void); @@ -132,7 +132,7 @@ public: class device_handle : uhd::noncopyable { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~device_handle(void); @@ -163,7 +163,7 @@ public: class special_handle : public usb_device_handle { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; virtual ~special_handle(void); diff --git a/host/lib/transport/libusb1_control.cpp b/host/lib/transport/libusb1_control.cpp index 10ab53553..b7aefe1c6 100644 --- a/host/lib/transport/libusb1_control.cpp +++ b/host/lib/transport/libusb1_control.cpp @@ -66,6 +66,6 @@ usb_control::sptr usb_control::make(usb_device_handle::sptr handle, const int in { return sptr(new libusb_control_impl( libusb::device_handle::get_cached_handle( - boost::static_pointer_cast(handle)->get_device()), + std::static_pointer_cast(handle)->get_device()), interface)); } diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index 9a1b74fb2..fbeddbcdd 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,7 @@ static const size_t DEFAULT_XFER_SIZE = 32 * 512; // bytes //! type for sharing the release queue with managed buffers class libusb_zero_copy_mb; -typedef boost::shared_ptr> mb_queue_sptr; +typedef std::shared_ptr> mb_queue_sptr; /*! * The libusb docs state that status and actual length can only be read in the callback. @@ -251,7 +251,7 @@ public: libusb_transfer* lut = libusb_alloc_transfer(0); UHD_ASSERT_THROW(lut != NULL); - _mb_pool.push_back(boost::make_shared(lut, + _mb_pool.push_back(std::make_shared(lut, this->get_frame_size(), boost::bind(&libusb_zero_copy_single::enqueue_buffer, this, _1), is_recv, @@ -345,7 +345,7 @@ private: //! Storage for transfer related objects buffer_pool::sptr _buffer_pool; - std::vector> _mb_pool; + std::vector> _mb_pool; boost::mutex _queue_mutex; boost::condition_variable _buff_ready_cond; @@ -440,7 +440,7 @@ struct libusb_zero_copy_impl : usb_zero_copy return _send_impl->get_frame_size(); } - boost::shared_ptr _recv_impl, _send_impl; + std::shared_ptr _recv_impl, _send_impl; boost::mutex _recv_mutex, _send_mutex; }; @@ -468,7 +468,7 @@ usb_zero_copy::sptr usb_zero_copy::make(usb_device_handle::sptr handle, const device_addr_t& hints) { 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())); return sptr(new libusb_zero_copy_impl( dev_handle, recv_interface, recv_endpoint, send_interface, send_endpoint, hints)); } diff --git a/host/lib/transport/muxed_zero_copy_if.cpp b/host/lib/transport/muxed_zero_copy_if.cpp index a3ea4c40d..532c3d3b2 100644 --- a/host/lib/transport/muxed_zero_copy_if.cpp +++ b/host/lib/transport/muxed_zero_copy_if.cpp @@ -9,21 +9,20 @@ #include #include #include -#include -#include #include #include #include +#include using namespace uhd; using namespace uhd::transport; class muxed_zero_copy_if_impl : public muxed_zero_copy_if, - public boost::enable_shared_from_this + public std::enable_shared_from_this { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; muxed_zero_copy_if_impl(zero_copy_if::sptr base_xport, stream_classifier_fn classify_fn, @@ -68,7 +67,7 @@ public: // Only allocate a portion of the base transport's frames to each stream // to prevent all streams from attempting to use all the frames. stream_impl::sptr stream = - boost::make_shared(this->shared_from_this(), + std::make_shared(this->shared_from_this(), stream_num, _base_xport->get_num_send_frames(), _base_xport->get_num_recv_frames()); @@ -117,8 +116,8 @@ private: class stream_impl : public zero_copy_if { public: - typedef boost::shared_ptr sptr; - typedef boost::weak_ptr wptr; + typedef std::shared_ptr sptr; + typedef std::weak_ptr wptr; stream_impl(muxed_zero_copy_if_impl::sptr muxed_xport, const uint32_t stream_num, @@ -135,7 +134,7 @@ private: , _buffer_index(0) { for (size_t i = 0; i < num_recv_frames; i++) { - _buffers[i] = boost::make_shared(_recv_frame_size); + _buffers[i] = std::make_shared(_recv_frame_size); } } @@ -201,7 +200,7 @@ private: const size_t _num_recv_frames; const size_t _recv_frame_size; bounded_buffer _buff_queue; - std::vector> _buffers; + std::vector> _buffers; size_t _buffer_index; }; @@ -299,6 +298,6 @@ muxed_zero_copy_if::sptr muxed_zero_copy_if::make(zero_copy_if::sptr base_xport, muxed_zero_copy_if::stream_classifier_fn classify_fn, size_t max_streams) { - return boost::make_shared( + return std::make_shared( base_xport, classify_fn, max_streams); } diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp index 9cd6644f1..f54e5a8ed 100644 --- a/host/lib/transport/nirio_zero_copy.cpp +++ b/host/lib/transport/nirio_zero_copy.cpp @@ -13,7 +13,7 @@ #include #include #include //get_page_size() -#include +#include #include // std::max #include #include @@ -136,7 +136,7 @@ private: class nirio_zero_copy_impl : public nirio_zero_copy { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; nirio_zero_copy_impl(uhd::niusrprio::niusrprio_session::sptr fpga_session, uint32_t instance, @@ -224,13 +224,13 @@ public: if (nirio_status_not_fatal(status)) { // allocate re-usable managed receive buffers for (size_t i = 0; i < get_num_recv_frames(); i++) { - _mrb_pool.push_back(boost::shared_ptr( + _mrb_pool.push_back(std::shared_ptr( new nirio_zero_copy_mrb(*_recv_fifo, get_recv_frame_size()))); } // allocate re-usable managed send buffers for (size_t i = 0; i < get_num_send_frames(); i++) { - _msb_pool.push_back(boost::shared_ptr( + _msb_pool.push_back(std::shared_ptr( new nirio_zero_copy_msb(*_send_fifo, get_send_frame_size()))); } } @@ -383,8 +383,8 @@ private: uint32_t _fifo_instance; nirio_fifo::sptr _recv_fifo, _send_fifo; const zero_copy_xport_params _xport_params; - std::vector> _msb_pool; - std::vector> _mrb_pool; + std::vector> _msb_pool; + std::vector> _mrb_pool; size_t _next_recv_buff_index, _next_send_buff_index; }; diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index 950da4c8a..a09281459 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/host/lib/transport/tcp_zero_copy.cpp b/host/lib/transport/tcp_zero_copy.cpp index 01bca900f..555dd238e 100644 --- a/host/lib/transport/tcp_zero_copy.cpp +++ b/host/lib/transport/tcp_zero_copy.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -133,7 +133,7 @@ tcp_zero_copy::~tcp_zero_copy(void) class tcp_zero_copy_asio_impl : public tcp_zero_copy { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; tcp_zero_copy_asio_impl( const std::string& addr, const std::string& port, const device_addr_t& hints) @@ -169,13 +169,13 @@ public: // allocate re-usable managed receive buffers for (size_t i = 0; i < get_num_recv_frames(); i++) { - _mrb_pool.push_back(boost::make_shared( + _mrb_pool.push_back(std::make_shared( _recv_buffer_pool->at(i), _sock_fd, get_recv_frame_size())); } // allocate re-usable managed send buffers for (size_t i = 0; i < get_num_send_frames(); i++) { - _msb_pool.push_back(boost::make_shared( + _msb_pool.push_back(std::make_shared( _send_buffer_pool->at(i), _sock_fd, get_send_frame_size())); } } @@ -225,13 +225,13 @@ private: const size_t _recv_frame_size, _num_recv_frames; const size_t _send_frame_size, _num_send_frames; buffer_pool::sptr _recv_buffer_pool, _send_buffer_pool; - std::vector> _msb_pool; - std::vector> _mrb_pool; + std::vector> _msb_pool; + std::vector> _mrb_pool; size_t _next_recv_buff_index, _next_send_buff_index; // asio guts -> socket and service asio::io_service _io_service; - boost::shared_ptr _socket; + std::shared_ptr _socket; int _sock_fd; }; diff --git a/host/lib/transport/udp_wsa_zero_copy.cpp b/host/lib/transport/udp_wsa_zero_copy.cpp index 36837cda4..b4880478a 100644 --- a/host/lib/transport/udp_wsa_zero_copy.cpp +++ b/host/lib/transport/udp_wsa_zero_copy.cpp @@ -187,7 +187,7 @@ private: class udp_zero_copy_wsa_impl : public udp_zero_copy { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; udp_zero_copy_wsa_impl(const std::string& addr, const std::string& port, @@ -272,14 +272,14 @@ public: // allocate re-usable managed receive buffers for (size_t i = 0; i < get_num_recv_frames(); i++) { _mrb_pool.push_back( - boost::shared_ptr(new udp_zero_copy_asio_mrb( + std::shared_ptr(new udp_zero_copy_asio_mrb( _recv_buffer_pool->at(i), _sock_fd, get_recv_frame_size()))); } // allocate re-usable managed send buffers for (size_t i = 0; i < get_num_send_frames(); i++) { _msb_pool.push_back( - boost::shared_ptr(new udp_zero_copy_asio_msb( + std::shared_ptr(new udp_zero_copy_asio_msb( _send_buffer_pool->at(i), _sock_fd, get_send_frame_size()))); } } @@ -383,8 +383,8 @@ private: const size_t _recv_frame_size, _num_recv_frames; const size_t _send_frame_size, _num_send_frames; buffer_pool::sptr _recv_buffer_pool, _send_buffer_pool; - std::vector> _msb_pool; - std::vector> _mrb_pool; + std::vector> _msb_pool; + std::vector> _mrb_pool; size_t _next_recv_buff_index, _next_send_buff_index; // socket guts diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp index 44df9526d..883b2a68a 100644 --- a/host/lib/transport/udp_zero_copy.cpp +++ b/host/lib/transport/udp_zero_copy.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -138,7 +138,7 @@ private: class udp_zero_copy_asio_impl : public udp_zero_copy { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; udp_zero_copy_asio_impl(const std::string& addr, const std::string& port, @@ -169,13 +169,13 @@ public: // allocate re-usable managed receive buffers for (size_t i = 0; i < get_num_recv_frames(); i++) { - _mrb_pool.push_back(boost::make_shared( + _mrb_pool.push_back(std::make_shared( _recv_buffer_pool->at(i), _sock_fd, get_recv_frame_size())); } // allocate re-usable managed send buffers for (size_t i = 0; i < get_num_send_frames(); i++) { - _msb_pool.push_back(boost::make_shared( + _msb_pool.push_back(std::make_shared( _send_buffer_pool->at(i), _sock_fd, get_send_frame_size())); } } @@ -247,8 +247,8 @@ private: const size_t _recv_frame_size, _num_recv_frames; const size_t _send_frame_size, _num_send_frames; buffer_pool::sptr _recv_buffer_pool, _send_buffer_pool; - std::vector> _msb_pool; - std::vector> _mrb_pool; + std::vector> _msb_pool; + std::vector> _mrb_pool; size_t _next_recv_buff_index, _next_send_buff_index; // asio guts -> socket and service diff --git a/host/lib/transport/zero_copy_flow_ctrl.cpp b/host/lib/transport/zero_copy_flow_ctrl.cpp index 7d1ddd7e0..f92b826db 100644 --- a/host/lib/transport/zero_copy_flow_ctrl.cpp +++ b/host/lib/transport/zero_copy_flow_ctrl.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -97,7 +97,7 @@ private: class zero_copy_flow_ctrl_impl : public zero_copy_flow_ctrl { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; zero_copy_flow_ctrl_impl(zero_copy_if::sptr transport, flow_ctrl_func send_flow_ctrl, @@ -114,11 +114,11 @@ public: for (size_t i = 0; i < transport->get_num_send_frames(); i++) { _send_buffers[i] = - boost::make_shared(_send_flow_ctrl); + std::make_shared(_send_flow_ctrl); } for (size_t i = 0; i < transport->get_num_recv_frames(); i++) { _recv_buffers[i] = - boost::make_shared(_recv_flow_ctrl); + std::make_shared(_recv_flow_ctrl); } } @@ -133,7 +133,7 @@ public: managed_recv_buffer::sptr ptr; managed_recv_buffer::sptr buff = _transport->get_recv_buff(timeout); if (buff) { - boost::shared_ptr mb = + std::shared_ptr mb = _recv_buffers[_recv_buff_index++]; _recv_buff_index %= _recv_buffers.size(); ptr = mb->get(buff); @@ -160,7 +160,7 @@ public: managed_send_buffer::sptr ptr; managed_send_buffer::sptr buff = _transport->get_send_buff(timeout); if (buff) { - boost::shared_ptr mb = + std::shared_ptr mb = _send_buffers[_send_buff_index++]; _send_buff_index %= _send_buffers.size(); ptr = mb->get(buff); @@ -183,8 +183,8 @@ private: zero_copy_if::sptr _transport; // buffers - std::vector> _send_buffers; - std::vector> _recv_buffers; + std::vector> _send_buffers; + std::vector> _recv_buffers; size_t _send_buff_index; size_t _recv_buff_index; diff --git a/host/lib/types/filters_python.hpp b/host/lib/types/filters_python.hpp index ad13eed1e..be02c7a98 100644 --- a/host/lib/types/filters_python.hpp +++ b/host/lib/types/filters_python.hpp @@ -40,7 +40,7 @@ void export_filters(py::module& m) .def("get_analog_type", &analog_filter_base::get_analog_type) ; - py::class_>(m, "analog_filter_lp") + py::class_>(m, "analog_filter_lp") .def(py::init()) // Methods 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; diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.hpp b/host/lib/usrp_clock/octoclock/octoclock_impl.hpp index d334da3ef..8fcda1999 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_impl.hpp +++ b/host/lib/usrp_clock/octoclock/octoclock_impl.hpp @@ -8,7 +8,7 @@ #ifndef INCLUDED_OCTOCLOCK_IMPL_HPP #define INCLUDED_OCTOCLOCK_IMPL_HPP -#include +#include #include #include diff --git a/host/lib/utils/ihex.cpp b/host/lib/utils/ihex.cpp index 6bb0ba9d4..fed2b239e 100644 --- a/host/lib/utils/ihex.cpp +++ b/host/lib/utils/ihex.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -180,7 +180,7 @@ void ihex_reader::read(ihex_reader::record_handle_type record_handler) // We need a functor for the cast, a lambda would be perfect... int _file_writer_callback( - boost::shared_ptr output_file, + std::shared_ptr output_file, unsigned char *buff, uint16_t len ) { @@ -190,7 +190,7 @@ int _file_writer_callback( void ihex_reader::to_bin_file(const std::string &bin_filename) { - boost::shared_ptr output_file(boost::make_shared()); + std::shared_ptr output_file(std::make_shared()); output_file->open(bin_filename.c_str(), std::ios::out | std::ios::binary); if (not output_file->is_open()) { throw uhd::io_error(str(boost::format("Could not open file for writing: %s") % bin_filename)); diff --git a/host/lib/utils/log.cpp b/host/lib/utils/log.cpp index c8d5e07cc..64e3e8e44 100644 --- a/host/lib/utils/log.cpp +++ b/host/lib/utils/log.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp index b29ca4678..e38dc9224 100644 --- a/host/python/pyuhd.cpp +++ b/host/python/pyuhd.cpp @@ -13,11 +13,6 @@ namespace py = pybind11; -// Allow boost::shared_ptr to be a holder class of an object (PyBind11 -// supports std::shared_ptr and std::unique_ptr out of the box) -#include -PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr); - #include "stream_python.hpp" #include "types/types_python.hpp" diff --git a/host/tests/common/mock_zero_copy.cpp b/host/tests/common/mock_zero_copy.cpp index 0843a0274..8b9e04f64 100644 --- a/host/tests/common/mock_zero_copy.cpp +++ b/host/tests/common/mock_zero_copy.cpp @@ -6,7 +6,7 @@ #include "mock_zero_copy.hpp" -#include +#include using namespace uhd::transport; diff --git a/host/tests/common/mock_zero_copy.hpp b/host/tests/common/mock_zero_copy.hpp index 515fde498..16a64f5a1 100644 --- a/host/tests/common/mock_zero_copy.hpp +++ b/host/tests/common/mock_zero_copy.hpp @@ -13,9 +13,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -71,7 +71,7 @@ private: class mock_zero_copy : public uhd::transport::zero_copy_if { public: - typedef boost::shared_ptr sptr; + typedef std::shared_ptr sptr; mock_zero_copy(uhd::transport::vrt::if_packet_info_t::link_type_t type, size_t recv_frame_size = DEFAULT_RECV_FRAME_SIZE, diff --git a/host/tests/expert_test.cpp b/host/tests/expert_test.cpp index 36a9ef03b..99e3c1100 100644 --- a/host/tests/expert_test.cpp +++ b/host/tests/expert_test.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -112,7 +112,7 @@ private: class worker5_t : public worker_node_t { public: - worker5_t(const node_retriever_t& db, boost::shared_ptr output) + worker5_t(const node_retriever_t& db, std::shared_ptr output) : worker_node_t("Consume_G"), _g(db, "G"), _c(db, "C"), _output(output) { bind_accessor(_g); @@ -128,7 +128,7 @@ private: data_reader_t _g; data_writer_t _c; - boost::shared_ptr _output; + std::shared_ptr _output; }; class worker6_t : public worker_node_t @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(test_experts) uhd::property_tree::sptr tree = uhd::property_tree::make(); // Output of expert tree - boost::shared_ptr final_output = boost::make_shared(); + std::shared_ptr final_output = std::make_shared(); // Add data nodes to container expert_factory::add_dual_prop_node( diff --git a/host/tests/packet_handler_benchmark.cpp b/host/tests/packet_handler_benchmark.cpp index d0a28bdc2..bf21b0c2b 100644 --- a/host/tests/packet_handler_benchmark.cpp +++ b/host/tests/packet_handler_benchmark.cpp @@ -56,7 +56,7 @@ struct rx_fc_cache_t }; inline bool rx_flow_ctrl( - boost::shared_ptr fc_cache, uhd::transport::managed_buffer::sptr buff) + std::shared_ptr fc_cache, uhd::transport::managed_buffer::sptr buff) { // If the caller supplied a buffer if (buff) { @@ -92,7 +92,7 @@ inline bool rx_flow_ctrl( } inline void handle_rx_flowctrl_ack( - boost::shared_ptr /*fc_cache*/, const uint32_t* /*payload*/) + std::shared_ptr /*fc_cache*/, const uint32_t* /*payload*/) { // For the benchmark, we should never reach this UHD_THROW_INVALID_CODE_PATH(); @@ -119,7 +119,7 @@ struct tx_fc_cache_t pack; }; -inline bool tx_flow_ctrl(boost::shared_ptr fc_cache, +inline bool tx_flow_ctrl(std::shared_ptr fc_cache, uhd::transport::zero_copy_if::sptr /*xport*/, uhd::transport::managed_buffer::sptr buff) { @@ -151,7 +151,7 @@ inline bool tx_flow_ctrl(boost::shared_ptr fc_cache, return false; } -inline void tx_flow_ctrl_ack(boost::shared_ptr fc_cache, +inline void tx_flow_ctrl_ack(std::shared_ptr fc_cache, uhd::transport::zero_copy_if::sptr /*send_xport*/) { if (not fc_cache->fc_received) { @@ -187,7 +187,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format) xport->set_reuse_recv_memory(true); // Configure xport flow control - boost::shared_ptr fc_cache(new rx_fc_cache_t()); + std::shared_ptr fc_cache(new rx_fc_cache_t()); fc_cache->to_host = uhd::ntohx; fc_cache->from_host = uhd::htonx; fc_cache->pack = vrt::chdr::if_hdr_pack_be; @@ -201,7 +201,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format) }); // Create streamer - auto streamer = boost::make_shared(spp); + auto streamer = std::make_shared(spp); streamer->set_tick_rate(1.0); streamer->set_samp_rate(1.0); @@ -260,7 +260,7 @@ void benchmark_send_packet_handler( xport->set_reuse_send_memory(true); // Configure flow control - boost::shared_ptr fc_cache(new tx_fc_cache_t()); + std::shared_ptr fc_cache(new tx_fc_cache_t()); fc_cache->to_host = uhd::ntohx; fc_cache->from_host = uhd::htonx; fc_cache->pack = vrt::chdr::if_hdr_pack_be; @@ -274,7 +274,7 @@ void benchmark_send_packet_handler( 0); // Create streamer - auto streamer = boost::make_shared(spp); + auto streamer = std::make_shared(spp); streamer->set_vrt_packer(&vrt::chdr::if_hdr_pack_be); // Configure converter diff --git a/host/tests/rx_streamer_test.cpp b/host/tests/rx_streamer_test.cpp index cd4daf569..1b1311908 100644 --- a/host/tests/rx_streamer_test.cpp +++ b/host/tests/rx_streamer_test.cpp @@ -6,7 +6,7 @@ #include "../common/mock_link.hpp" #include -#include +#include #include #include @@ -148,13 +148,13 @@ static std::vector make_links(const size_t num) return links; } -static boost::shared_ptr make_rx_streamer( +static std::shared_ptr make_rx_streamer( std::vector recv_links, const std::string& host_format, const std::string& otw_format = "sc16") { const uhd::stream_args_t stream_args(host_format, otw_format); - auto streamer = boost::make_shared(recv_links.size(), stream_args); + auto streamer = std::make_shared(recv_links.size(), stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp index 3c185d21a..5685028d6 100644 --- a/host/tests/sph_recv_test.cpp +++ b/host/tests/sph_recv_test.cpp @@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_normal) std::vector xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_sequence_error) std::vector xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_time_error) std::vector xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -642,7 +642,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_exception) std::vector xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets @@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment) std::vector xports; for (size_t i = 0; i < NCHANNELS; i++) { xports.push_back( - boost::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); + std::make_shared(vrt::if_packet_info_t::LINK_TYPE_VRLP)); } // generate a bunch of packets diff --git a/host/tests/streamer_benchmark.cpp b/host/tests/streamer_benchmark.cpp index 46ba6add0..02aa102a0 100644 --- a/host/tests/streamer_benchmark.cpp +++ b/host/tests/streamer_benchmark.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -219,11 +219,11 @@ using tx_streamer_mock_link = mock_tx_streamer; /*! * Helper functions */ -static boost::shared_ptr make_rx_streamer_mock_xport( +static std::shared_ptr make_rx_streamer_mock_xport( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared(1, stream_args); + auto streamer = std::make_shared(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -238,11 +238,11 @@ static boost::shared_ptr make_rx_streamer_mock_xport( return streamer; } -static boost::shared_ptr make_tx_streamer_mock_xport( +static std::shared_ptr make_tx_streamer_mock_xport( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared(1, stream_args); + auto streamer = std::make_shared(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -257,11 +257,11 @@ static boost::shared_ptr make_tx_streamer_mock_xport( return streamer; } -static boost::shared_ptr make_rx_streamer_mock_link( +static std::shared_ptr make_rx_streamer_mock_link( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared(1, stream_args); + auto streamer = std::make_shared(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); @@ -307,11 +307,11 @@ static boost::shared_ptr make_rx_streamer_mock_link( return streamer; } -static boost::shared_ptr make_tx_streamer_mock_link( +static std::shared_ptr make_tx_streamer_mock_link( const size_t spp, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared(1, stream_args); + auto streamer = std::make_shared(1, stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); streamer->set_scale_factor(0, SCALE_FACTOR); diff --git a/host/tests/tx_streamer_test.cpp b/host/tests/tx_streamer_test.cpp index 686c1b761..09c8357df 100644 --- a/host/tests/tx_streamer_test.cpp +++ b/host/tests/tx_streamer_test.cpp @@ -6,7 +6,7 @@ #include "../common/mock_link.hpp" #include -#include +#include #include #include @@ -121,11 +121,11 @@ static std::vector make_links(const size_t num) return links; } -static boost::shared_ptr make_tx_streamer( +static std::shared_ptr make_tx_streamer( std::vector send_links, const std::string& format) { const uhd::stream_args_t stream_args(format, "sc16"); - auto streamer = boost::make_shared(send_links.size(), stream_args); + auto streamer = std::make_shared(send_links.size(), stream_args); streamer->set_tick_rate(TICK_RATE); streamer->set_samp_rate(SAMP_RATE); @@ -379,7 +379,7 @@ BOOST_AUTO_TEST_CASE(test_spp) auto send_links = make_links(1); uhd::stream_args_t stream_args("fc64", "sc16"); stream_args.args["spp"] = std::to_string(10); - auto streamer = boost::make_shared(send_links.size(), stream_args); + auto streamer = std::make_shared(send_links.size(), stream_args); mock_tx_data_xport::uptr xport(std::make_unique(send_links[0])); streamer->connect_channel(0, std::move(xport)); BOOST_CHECK_EQUAL(streamer->get_max_num_samps(), 10); @@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE(test_spp) auto send_links = make_links(1); uhd::stream_args_t stream_args("fc64", "sc16"); stream_args.args["spp"] = std::to_string(10000); - auto streamer = boost::make_shared(send_links.size(), stream_args); + auto streamer = std::make_shared(send_links.size(), stream_args); mock_tx_data_xport::uptr xport(std::make_unique(send_links[0])); const size_t max_pyld = xport->get_max_payload_size(); streamer->connect_channel(0, std::move(xport)); diff --git a/host/utils/latency/responder.cpp b/host/utils/latency/responder.cpp index fd47ad085..9b27fdcb8 100644 --- a/host/utils/latency/responder.cpp +++ b/host/utils/latency/responder.cpp @@ -117,6 +117,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) } // create a new instance of Responder and run it! - boost::shared_ptr my_responder(new Responder(prog)); + std::shared_ptr my_responder(new Responder(prog)); return my_responder->run(); } -- cgit v1.2.3