diff options
Diffstat (limited to 'host/lib')
101 files changed, 334 insertions, 338 deletions
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<msgpack:zone> z = result.zone();      //         on_message(obj, z);      // -    //         //// boost::shared_ptr is also usable: -    //         // boost::shared_ptr<zone> life(z.release()); +    //         //// std::shared_ptr is also usable: +    //         // std::shared_ptr<zone> 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 <uhdlib/utils/prefs.hpp>  #include <boost/format.hpp> -#include <boost/weak_ptr.hpp>  #include <boost/functional/hash.hpp>  #include <boost/tuple/tuple.hpp>  #include <boost/thread/mutex.hpp>  #include <future> +#include <memory>  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<size_t, boost::weak_ptr<device> > hash_to_device; +    static uhd::dict<size_t, std::weak_ptr<device> > 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 <uhdlib/experts/expert_container.hpp>  #include <uhd/exception.hpp>  #include <uhd/utils/log.hpp> +#include <uhdlib/experts/expert_container.hpp> +#include <boost/bind.hpp>  #include <boost/format.hpp>  #include <boost/function.hpp> -#include <boost/bind.hpp> -#include <boost/make_shared.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/thread/mutex.hpp> -#include <boost/thread.hpp> -#include <boost/graph/graph_traits.hpp> +#include <boost/graph/adjacency_list.hpp>  #include <boost/graph/depth_first_search.hpp> +#include <boost/graph/graph_traits.hpp>  #include <boost/graph/topological_sort.hpp> -#include <boost/graph/adjacency_list.hpp> +#include <boost/thread.hpp> +#include <boost/thread/mutex.hpp> +#include <memory>  #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<expert_container_impl>(name); +    return std::make_shared<expert_container_impl>(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 <uhdlib/experts/expert_nodes.hpp>  #include <uhd/config.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/thread/recursive_mutex.hpp>  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<expert_container> sptr; +        typedef std::shared_ptr<expert_container> 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 <uhd/config.hpp>  #include <uhd/rfnoc/register_iface.hpp>  #include <uhd/types/wb_iface.hpp> -#include <boost/make_shared.hpp> +#include <memory>  //! Convenience macro to generate a reg_iface_adapter from within an RFNoC block  #define RFNOC_MAKE_WB_IFACE(BASE_OFFSET, CHAN)                               \ -    boost::make_shared<reg_iface_adapter>(                                   \ +    std::make_shared<reg_iface_adapter>(                                   \          [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<reg_iface_adapter>( + * wb_iface::sptr ctrl = std::make_shared<reg_iface_adapter>(   *     [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 <uhd/rfnoc/mb_controller.hpp>  #include <uhdlib/rfnoc/client_zero.hpp>  #include <uhdlib/rfnoc/mb_iface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  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<rfnoc_device>; // FIXME make std::shared_ptr when +    using sptr = std::shared_ptr<rfnoc_device>; // 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 <uhdlib/transport/dpdk_common.hpp>  #include <uhd/types/device_addr.hpp>  #include <uhd/transport/zero_copy.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <string> @@ -21,7 +21,7 @@ namespace uhd { namespace transport {   */  class dpdk_zero_copy : public virtual zero_copy_if {  public: -    typedef boost::shared_ptr<dpdk_zero_copy> sptr; +    typedef std::shared_ptr<dpdk_zero_copy> 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 <uhd/types/serial.hpp>  #include <uhd/types/sensors.hpp>  #include <uhd/exception.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <ad9361_device.h>  #include <string>  #include <complex> @@ -40,7 +40,7 @@ namespace uhd { namespace usrp {  class ad9361_ctrl : public uhd::noncopyable  {  public: -    typedef boost::shared_ptr<ad9361_ctrl> sptr; +    typedef std::shared_ptr<ad9361_ctrl> 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 <uhd/types/direction.hpp>  #include <uhdlib/usrp/common/ad9361_ctrl.hpp>  #include <boost/format.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <stdint.h>  #include <functional> @@ -29,7 +29,7 @@ namespace uhd { namespace usrp {  class ad936x_manager  {  public: -    typedef boost::shared_ptr<ad936x_manager> sptr; +    typedef std::shared_ptr<ad936x_manager> 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<adf435x_iface> sptr; +    typedef std::shared_ptr<adf435x_iface> sptr;      typedef boost::function<void(std::vector<uint32_t>)> 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 <uhd/transport/usb_control.hpp>  #include <uhd/types/serial.hpp> //i2c iface  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #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<fx2_ctrl> sptr; +    typedef std::shared_ptr<fx2_ctrl> 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<max287x_iface> sptr; +    typedef std::shared_ptr<max287x_iface> sptr;      typedef boost::function<void(std::vector<uint32_t>)> 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 <uhd/config.hpp>  #include <uhd/transport/zero_copy.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <stdint.h>  namespace uhd{ namespace usrp{      class recv_packet_demuxer{      public: -        typedef boost::shared_ptr<recv_packet_demuxer> sptr; +        typedef std::shared_ptr<recv_packet_demuxer> 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 <uhd/types/time_spec.hpp>  #include <uhd/utils/byteswap.hpp>  #include <boost/thread.hpp> -#include <boost/enable_shared_from_this.hpp> +#include <memory>  #include <queue>  #include <map>  #include <chrono> @@ -22,9 +22,9 @@  namespace uhd{ namespace usrp{ -    struct recv_packet_demuxer_3000 : boost::enable_shared_from_this<recv_packet_demuxer_3000> +    struct recv_packet_demuxer_3000 : std::enable_shared_from_this<recv_packet_demuxer_3000>      { -        typedef boost::shared_ptr<recv_packet_demuxer_3000> sptr; +        typedef std::shared_ptr<recv_packet_demuxer_3000> 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 <uhd/usrp/gpio_defs.hpp>  #include <uhd/utils/noncopyable.hpp>  #include <uhdlib/usrp/gpio_defs.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  namespace uhd { namespace usrp { namespace gpio_atr {  class gpio_atr_3000 : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<gpio_atr_3000> sptr; +    typedef std::shared_ptr<gpio_atr_3000> sptr;      static const uint32_t MASK_SET_ALL = 0xFFFFFFFF; @@ -118,7 +118,7 @@ public:  class db_gpio_atr_3000  {  public: -    typedef boost::shared_ptr<db_gpio_atr_3000> sptr; +    typedef std::shared_ptr<db_gpio_atr_3000> 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 <uhd/usrp/dboard_iface.hpp>  #include <uhd/usrp/gpio_defs.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/wb_iface.hpp>  #include <map>  #include <stdint.h>  class gpio_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<gpio_core_200> sptr; +    typedef std::shared_ptr<gpio_core_200> 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<gpio_core_200_32wo> sptr; +    typedef std::shared_ptr<gpio_core_200_32wo> 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp>  #include <uhd/types/wb_iface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  class i2c_core_100_wb32 : uhd::noncopyable, public uhd::i2c_iface{  public: -    typedef boost::shared_ptr<i2c_core_100_wb32> sptr; +    typedef std::shared_ptr<i2c_core_100_wb32> 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp>  #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/wb_iface.hpp>  class i2c_core_200 : uhd::noncopyable, public uhd::i2c_iface{  public: -    typedef boost::shared_ptr<i2c_core_200> sptr; +    typedef std::shared_ptr<i2c_core_200> 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 <uhd/types/time_spec.hpp>  #include <uhd/transport/zero_copy.hpp>  #include <uhd/types/wb_iface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/utility.hpp>  #include <string> @@ -22,7 +22,7 @@  class radio_ctrl_core_3000 : public uhd::timed_wb_iface  {  public: -    typedef boost::shared_ptr<radio_ctrl_core_3000> sptr; +    typedef std::shared_ptr<radio_ctrl_core_3000> 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 <uhd/stream.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/types/wb_iface.hpp>  #include <string>  class rx_dsp_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<rx_dsp_core_200> sptr; +    typedef std::shared_ptr<rx_dsp_core_200> 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 <uhd/types/wb_iface.hpp>  #include <uhd/usrp/fe_connection.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <string>  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<rx_dsp_core_3000> sptr; +    typedef std::shared_ptr<rx_dsp_core_3000> 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 <uhd/types/wb_iface.hpp>  #include <uhd/property_tree.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <complex>  #include <string> @@ -22,7 +22,7 @@ public:      static const bool DEFAULT_DC_OFFSET_ENABLE;      static const std::complex<double> DEFAULT_IQ_BALANCE_VALUE; -    typedef boost::shared_ptr<rx_frontend_core_200> sptr; +    typedef std::shared_ptr<rx_frontend_core_200> 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 <uhd/types/wb_iface.hpp>  #include <uhd/usrp/fe_connection.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <complex>  #include <string> @@ -24,7 +24,7 @@ public:      static const bool DEFAULT_DC_OFFSET_ENABLE;      static const std::complex<double> DEFAULT_IQ_BALANCE_VALUE; -    typedef boost::shared_ptr<rx_frontend_core_3000> sptr; +    typedef std::shared_ptr<rx_frontend_core_3000> 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 <uhd/stream.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/types/wb_iface.hpp>  #include <string> @@ -20,7 +20,7 @@  class rx_vita_core_3000 : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<rx_vita_core_3000> sptr; +    typedef std::shared_ptr<rx_vita_core_3000> 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp>  #include <uhd/types/wb_iface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <memory>  #include <functional>  class spi_core_3000 : uhd::noncopyable, public uhd::spi_iface  {  public: -    using sptr = boost::shared_ptr<spi_core_3000>; +    using sptr = std::shared_ptr<spi_core_3000>;      using poke32_fn_t = std::function<void(uint32_t, uint32_t)>;      using peek32_fn_t = std::function<uint32_t(uint32_t)>; 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 <uhd/utils/noncopyable.hpp>  #include <uhd/types/wb_iface.hpp>  #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <string>  #include <vector>  class time64_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<time64_core_200> sptr; +    typedef std::shared_ptr<time64_core_200> 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 <uhd/config.hpp>  #include <uhd/types/time_spec.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/wb_iface.hpp>  class time_core_3000 : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<time_core_3000> sptr; +    typedef std::shared_ptr<time_core_3000> 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 <uhd/stream.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/wb_iface.hpp>  class tx_dsp_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<tx_dsp_core_200> sptr; +    typedef std::shared_ptr<tx_dsp_core_200> 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 <uhd/types/ranges.hpp>  #include <uhd/types/wb_iface.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  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<tx_dsp_core_3000> sptr; +    typedef std::shared_ptr<tx_dsp_core_3000> 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 <uhd/types/wb_iface.hpp>  #include <uhd/property_tree.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <complex>  #include <string>  class tx_frontend_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<tx_frontend_core_200> sptr; +    typedef std::shared_ptr<tx_frontend_core_200> sptr;      static const std::complex<double> DEFAULT_DC_OFFSET_VALUE;      static const std::complex<double> 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 <uhd/stream.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/stream_cmd.hpp>  #include <uhd/types/wb_iface.hpp>  #include <string> @@ -20,7 +20,7 @@  class tx_vita_core_3000 : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<tx_vita_core_3000> sptr; +    typedef std::shared_ptr<tx_vita_core_3000> 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 <uhd/utils/noncopyable.hpp>  #include <uhd/types/wb_iface.hpp>  #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  class user_settings_core_200 : uhd::noncopyable{  public: -    typedef boost::shared_ptr<user_settings_core_200> sptr; +    typedef std::shared_ptr<user_settings_core_200> sptr;      typedef std::pair<uint8_t, uint32_t> 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 <uhd/config.hpp>  #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/types/wb_iface.hpp>  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 <uhd/property_tree.hpp>  #include <uhd/types/dict.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread/mutex.hpp>  #include <iostream>  #include <typeindex> @@ -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<tree_guts_type>(); +        _guts = std::make_shared<tree_guts_type>();      }      sptr subtree(const fs_path& path_) const @@ -134,7 +134,7 @@ public:          return node->keys();      } -    boost::shared_ptr<void> _pop(const fs_path& path_) +    std::shared_ptr<void> _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<void>& prop, +    void _create(const fs_path& path_, const std::shared_ptr<void>& 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<void>& _access(const fs_path& path_) const +    std::shared_ptr<void>& _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<void>& _access_with_type_check( +    std::shared_ptr<void>& _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<std::string, node_type>      { -        boost::shared_ptr<void> prop; +        std::shared_ptr<void> prop;          std::size_t prop_type_hash;      }; @@ -232,7 +232,7 @@ private:      };      // members, the tree and root prefix -    boost::shared_ptr<tree_guts_type> _guts; +    std::shared_ptr<tree_guts_type> _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 <uhdlib/rfnoc/link_stream_manager.hpp>  #include <uhdlib/transport/links.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <map>  #include <set> 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 <uhdlib/rfnoc/rfnoc_rx_streamer.hpp>  #include <uhdlib/rfnoc/rfnoc_tx_streamer.hpp>  #include <uhdlib/utils/narrow.hpp> -#include <boost/make_shared.hpp> -#include <boost/shared_ptr.hpp> // FIXME remove when rfnoc_device is ready  #include <memory>  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<rfnoc_tx_streamer>(streamer); +        auto rfnoc_streamer = std::dynamic_pointer_cast<rfnoc_tx_streamer>(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<rfnoc_rx_streamer>(streamer); +        auto rfnoc_streamer = std::dynamic_pointer_cast<rfnoc_rx_streamer>(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<rfnoc_rx_streamer>(num_chans, args)); +        _rx_streamers.push_back(std::make_shared<rfnoc_rx_streamer>(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<rfnoc_tx_streamer>(num_chans, args)); +        _tx_streamers.push_back(std::make_shared<rfnoc_tx_streamer>(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<detail::rfnoc_device>(uhd::device::make(device_addr)); +        std::dynamic_pointer_cast<detail::rfnoc_device>(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 <uhdlib/utils/prefs.hpp>  #include <boost/algorithm/string.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <stack>  #include <sys/syslog.h>  #include <arpa/inet.h> 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 <uhd/utils/tasks.hpp>  #include <boost/bind.hpp>  #include <boost/thread/mutex.hpp> -#include <boost/weak_ptr.hpp>  #include <cstdlib>  #include <iostream>  #include <mutex> +#include <memory>  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<session> global_session; +    static std::weak_ptr<session> 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<libusb_device*, boost::weak_ptr<device_handle>> handles; +    static uhd::dict<libusb_device*, std::weak_ptr<device_handle>> 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 <uhd/config.hpp>  #include <uhd/transport/usb_device_handle.hpp>  #include <libusb.h> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/utils/noncopyable.hpp>  //! 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<session> sptr; +    typedef std::shared_ptr<session> sptr;      virtual ~session(void); @@ -78,7 +78,7 @@ public:  class device : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<device> sptr; +    typedef std::shared_ptr<device> sptr;      virtual ~device(void); @@ -93,7 +93,7 @@ public:  class device_list : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<device_list> sptr; +    typedef std::shared_ptr<device_list> sptr;      virtual ~device_list(void); @@ -113,7 +113,7 @@ public:  class device_descriptor : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<device_descriptor> sptr; +    typedef std::shared_ptr<device_descriptor> sptr;      virtual ~device_descriptor(void); @@ -132,7 +132,7 @@ public:  class device_handle : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<device_handle> sptr; +    typedef std::shared_ptr<device_handle> sptr;      virtual ~device_handle(void); @@ -163,7 +163,7 @@ public:  class special_handle : public usb_device_handle  {  public: -    typedef boost::shared_ptr<special_handle> sptr; +    typedef std::shared_ptr<special_handle> 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<libusb::special_handle>(handle)->get_device()), +            std::static_pointer_cast<libusb::special_handle>(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 <boost/circular_buffer.hpp>  #include <boost/format.hpp>  #include <boost/function.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread/condition_variable.hpp>  #include <boost/thread/mutex.hpp>  #include <list> @@ -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<bounded_buffer<libusb_zero_copy_mb*>> mb_queue_sptr; +typedef std::shared_ptr<bounded_buffer<libusb_zero_copy_mb*>> 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<libusb_zero_copy_mb>(lut, +            _mb_pool.push_back(std::make_shared<libusb_zero_copy_mb>(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<boost::shared_ptr<libusb_zero_copy_mb>> _mb_pool; +    std::vector<std::shared_ptr<libusb_zero_copy_mb>> _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<libusb_zero_copy_single> _recv_impl, _send_impl; +    std::shared_ptr<libusb_zero_copy_single> _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<libusb::special_handle>(handle)->get_device())); +        std::static_pointer_cast<libusb::special_handle>(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 <uhd/transport/bounded_buffer.hpp>  #include <uhd/transport/muxed_zero_copy_if.hpp>  #include <uhd/utils/safe_call.hpp> -#include <boost/enable_shared_from_this.hpp> -#include <boost/make_shared.hpp>  #include <boost/thread.hpp>  #include <boost/thread/locks.hpp>  #include <map> +#include <memory>  using namespace uhd;  using namespace uhd::transport;  class muxed_zero_copy_if_impl      : public muxed_zero_copy_if, -      public boost::enable_shared_from_this<muxed_zero_copy_if_impl> +      public std::enable_shared_from_this<muxed_zero_copy_if_impl>  {  public: -    typedef boost::shared_ptr<muxed_zero_copy_if_impl> sptr; +    typedef std::shared_ptr<muxed_zero_copy_if_impl> 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<stream_impl>(this->shared_from_this(), +            std::make_shared<stream_impl>(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<stream_impl> sptr; -        typedef boost::weak_ptr<stream_impl> wptr; +        typedef std::shared_ptr<stream_impl> sptr; +        typedef std::weak_ptr<stream_impl> 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<stream_mrb>(_recv_frame_size); +                _buffers[i] = std::make_shared<stream_mrb>(_recv_frame_size);              }          } @@ -201,7 +200,7 @@ private:          const size_t _num_recv_frames;          const size_t _recv_frame_size;          bounded_buffer<managed_recv_buffer::sptr> _buff_queue; -        std::vector<boost::shared_ptr<stream_mrb>> _buffers; +        std::vector<std::shared_ptr<stream_mrb>> _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<muxed_zero_copy_if_impl>( +    return std::make_shared<muxed_zero_copy_if_impl>(          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 <boost/date_time/posix_time/posix_time.hpp>  #include <boost/format.hpp>  #include <boost/interprocess/mapped_region.hpp> //get_page_size() -#include <boost/make_shared.hpp> +#include <memory>  #include <algorithm> // std::max  #include <chrono>  #include <thread> @@ -136,7 +136,7 @@ private:  class nirio_zero_copy_impl : public nirio_zero_copy  {  public: -    typedef boost::shared_ptr<nirio_zero_copy_impl> sptr; +    typedef std::shared_ptr<nirio_zero_copy_impl> 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<nirio_zero_copy_mrb>( +                    _mrb_pool.push_back(std::shared_ptr<nirio_zero_copy_mrb>(                          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<nirio_zero_copy_msb>( +                    _msb_pool.push_back(std::shared_ptr<nirio_zero_copy_msb>(                          new nirio_zero_copy_msb(*_send_fifo, get_send_frame_size())));                  }              } @@ -383,8 +383,8 @@ private:      uint32_t _fifo_instance;      nirio_fifo<fifo_data_t>::sptr _recv_fifo, _send_fifo;      const zero_copy_xport_params _xport_params; -    std::vector<boost::shared_ptr<nirio_zero_copy_msb>> _msb_pool; -    std::vector<boost::shared_ptr<nirio_zero_copy_mrb>> _mrb_pool; +    std::vector<std::shared_ptr<nirio_zero_copy_msb>> _msb_pool; +    std::vector<std::shared_ptr<nirio_zero_copy_mrb>> _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 <boost/dynamic_bitset.hpp>  #include <boost/format.hpp>  #include <boost/function.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <iostream>  #include <vector> 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 <uhdlib/utils/atomic.hpp>  #include <uhdlib/transport/udp_common.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <chrono>  #include <thread>  #include <vector> @@ -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<tcp_zero_copy_asio_impl> sptr; +    typedef std::shared_ptr<tcp_zero_copy_asio_impl> 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<tcp_zero_copy_asio_mrb>( +            _mrb_pool.push_back(std::make_shared<tcp_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::make_shared<tcp_zero_copy_asio_msb>( +            _msb_pool.push_back(std::make_shared<tcp_zero_copy_asio_msb>(                  _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<boost::shared_ptr<tcp_zero_copy_asio_msb>> _msb_pool; -    std::vector<boost::shared_ptr<tcp_zero_copy_asio_mrb>> _mrb_pool; +    std::vector<std::shared_ptr<tcp_zero_copy_asio_msb>> _msb_pool; +    std::vector<std::shared_ptr<tcp_zero_copy_asio_mrb>> _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<asio::ip::tcp::socket> _socket; +    std::shared_ptr<asio::ip::tcp::socket> _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<udp_zero_copy_wsa_impl> sptr; +    typedef std::shared_ptr<udp_zero_copy_wsa_impl> 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<udp_zero_copy_asio_mrb>(new udp_zero_copy_asio_mrb( +                std::shared_ptr<udp_zero_copy_asio_mrb>(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<udp_zero_copy_asio_msb>(new udp_zero_copy_asio_msb( +                std::shared_ptr<udp_zero_copy_asio_msb>(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<boost::shared_ptr<udp_zero_copy_asio_msb>> _msb_pool; -    std::vector<boost::shared_ptr<udp_zero_copy_asio_mrb>> _mrb_pool; +    std::vector<std::shared_ptr<udp_zero_copy_asio_msb>> _msb_pool; +    std::vector<std::shared_ptr<udp_zero_copy_asio_mrb>> _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 <uhdlib/transport/udp_common.hpp>  #include <uhdlib/utils/atomic.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <chrono>  #include <thread>  #include <vector> @@ -138,7 +138,7 @@ private:  class udp_zero_copy_asio_impl : public udp_zero_copy  {  public: -    typedef boost::shared_ptr<udp_zero_copy_asio_impl> sptr; +    typedef std::shared_ptr<udp_zero_copy_asio_impl> 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<udp_zero_copy_asio_mrb>( +            _mrb_pool.push_back(std::make_shared<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::make_shared<udp_zero_copy_asio_msb>( +            _msb_pool.push_back(std::make_shared<udp_zero_copy_asio_msb>(                  _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<boost::shared_ptr<udp_zero_copy_asio_msb>> _msb_pool; -    std::vector<boost::shared_ptr<udp_zero_copy_asio_mrb>> _mrb_pool; +    std::vector<std::shared_ptr<udp_zero_copy_asio_msb>> _msb_pool; +    std::vector<std::shared_ptr<udp_zero_copy_asio_mrb>> _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 <uhd/utils/safe_call.hpp>  #include <boost/bind.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread/mutex.hpp>  #include <boost/thread/thread.hpp> @@ -97,7 +97,7 @@ private:  class zero_copy_flow_ctrl_impl : public zero_copy_flow_ctrl  {  public: -    typedef boost::shared_ptr<zero_copy_flow_ctrl_impl> sptr; +    typedef std::shared_ptr<zero_copy_flow_ctrl_impl> 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<zero_copy_flow_ctrl_msb>(_send_flow_ctrl); +                std::make_shared<zero_copy_flow_ctrl_msb>(_send_flow_ctrl);          }          for (size_t i = 0; i < transport->get_num_recv_frames(); i++) {              _recv_buffers[i] = -                boost::make_shared<zero_copy_flow_ctrl_mrb>(_recv_flow_ctrl); +                std::make_shared<zero_copy_flow_ctrl_mrb>(_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<zero_copy_flow_ctrl_mrb> mb = +            std::shared_ptr<zero_copy_flow_ctrl_mrb> 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<zero_copy_flow_ctrl_msb> mb = +            std::shared_ptr<zero_copy_flow_ctrl_msb> 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<boost::shared_ptr<zero_copy_flow_ctrl_msb>> _send_buffers; -    std::vector<boost::shared_ptr<zero_copy_flow_ctrl_mrb>> _recv_buffers; +    std::vector<std::shared_ptr<zero_copy_flow_ctrl_msb>> _send_buffers; +    std::vector<std::shared_ptr<zero_copy_flow_ctrl_mrb>> _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_<analog_filter_lp, boost::shared_ptr<analog_filter_lp>>(m, "analog_filter_lp") +    py::class_<analog_filter_lp, std::shared_ptr<analog_filter_lp>>(m, "analog_filter_lp")          .def(py::init<filter_info_type, bool, size_t, const std::string, double, double>())          // 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 <uhdlib/usrp/cores/tx_dsp_core_200.hpp>  #include <uhdlib/usrp/cores/time64_core_200.hpp>  #include <uhdlib/usrp/cores/user_settings_core_200.hpp> -#include <boost/weak_ptr.hpp> +#include <memory>  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<uhd::usrp::recv_packet_demuxer_3000> _recv_demuxer; +    std::shared_ptr<uhd::usrp::recv_packet_demuxer_3000> _recv_demuxer;      //dboard stuff      uhd::usrp::dboard_manager::sptr _dboard_manager;      bool _ignore_cal_file; -    std::vector<boost::weak_ptr<uhd::rx_streamer> > _rx_streamers; -    std::vector<boost::weak_ptr<uhd::tx_streamer> > _tx_streamers; +    std::vector<std::weak_ptr<uhd::rx_streamer> > _rx_streamers; +    std::vector<std::weak_ptr<uhd::tx_streamer> > _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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <vector>  /*! @@ -19,7 +19,7 @@   */  class b100_clock_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<b100_clock_ctrl> sptr; +    typedef std::shared_ptr<b100_clock_ctrl> 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 <uhd/types/serial.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  /*!   * The B100 codec control: @@ -20,7 +20,7 @@   */  class b100_codec_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<b100_codec_ctrl> sptr; +    typedef std::shared_ptr<b100_codec_ctrl> 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 <uhd/types/metadata.hpp>  #include <uhd/types/serial.hpp>  #include <uhd/transport/zero_copy.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/utility.hpp>  #include <uhd/types/wb_iface.hpp>  #include <string> @@ -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<fifo_ctrl_excelsior> sptr; +    typedef std::shared_ptr<fifo_ctrl_excelsior> 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 <boost/format.hpp>  #include <boost/bind.hpp>  #include <boost/thread.hpp> -#include <boost/make_shared.hpp> +#include <memory>  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<sph::recv_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<sph::recv_packet_streamer>(_rx_streamers[i].lock()); +        std::shared_ptr<sph::recv_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<sph::recv_packet_streamer>(_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<sph::send_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<sph::send_packet_streamer>(_tx_streamers[i].lock()); +        std::shared_ptr<sph::send_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<sph::send_packet_streamer>(_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<sph::recv_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::recv_packet_streamer>(_rx_streamers[dspno].lock()); +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::recv_packet_streamer>(_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<sph::send_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::send_packet_streamer>(_tx_streamers[dspno].lock()); +    std::shared_ptr<sph::send_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::send_packet_streamer>(_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<double>("spp", bpp/bpi));      //make the new streamer given the samples per packet -    boost::shared_ptr<sph::recv_packet_streamer> my_streamer = boost::make_shared<sph::recv_packet_streamer>(spp); +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = std::make_shared<sph::recv_packet_streamer>(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<sph::send_packet_streamer> my_streamer = boost::make_shared<sph::send_packet_streamer>(spp); +    std::shared_ptr<sph::send_packet_streamer> my_streamer = std::make_shared<sph::send_packet_streamer>(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 <uhd/utils/log.hpp>  #include <uhd/utils/tasks.hpp>  #include <uhdlib/utils/atomic.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread/mutex.hpp>  #include <boost/thread/condition_variable.hpp>  #include <boost/bind.hpp> @@ -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<usb_zero_copy_wrapper_mrb>()); +            _mrb_pool.push_back(std::make_shared<usb_zero_copy_wrapper_mrb>());          } -        _the_only_msb = boost::make_shared<usb_zero_copy_wrapper_msb>(usb_zc, frame_boundary); +        _the_only_msb = std::make_shared<usb_zero_copy_wrapper_msb>(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<boost::shared_ptr<usb_zero_copy_wrapper_mrb> > _mrb_pool; -    boost::shared_ptr<usb_zero_copy_wrapper_msb> _the_only_msb; +    std::vector<std::shared_ptr<usb_zero_copy_wrapper_mrb> > _mrb_pool; +    std::shared_ptr<usb_zero_copy_wrapper_msb> _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 <uhd/utils/noncopyable.hpp>  #include <uhdlib/usrp/cores/spi_core_3000.hpp>  #include <uhdlib/usrp/common/adf4001_ctrl.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <mutex>  class b200_local_spi_core : uhd::noncopyable, public uhd::spi_iface {  public: -    typedef boost::shared_ptr<b200_local_spi_core> sptr; +    typedef std::shared_ptr<b200_local_spi_core> 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<b200_ref_pll_ctrl> sptr; +    typedef std::shared_ptr<b200_ref_pll_ctrl> 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 <uhd/types/dict.hpp>  #include <uhdlib/usrp/common/ad9361_ctrl.hpp>  #include <boost/assign/list_of.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/utils/noncopyable.hpp>  #include <stdint.h> @@ -79,7 +79,7 @@ static const uhd::dict<b200_product_t, std::string> B2XX_FPGA_FILE_NAME = boost:  class UHD_API b200_iface: uhd::noncopyable, public virtual uhd::i2c_iface {  public: -    typedef boost::shared_ptr<b200_iface> sptr; +    typedef std::shared_ptr<b200_iface> 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 <boost/filesystem.hpp>  #include <boost/lexical_cast.hpp>  #include <boost/functional/hash.hpp> -#include <boost/make_shared.hpp> -#include <boost/weak_ptr.hpp> +#include <memory>  #include <cstdio>  #include <ctime>  #include <cmath> @@ -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<libusb::special_handle>(handle)->get_device() +            std::static_pointer_cast<libusb::special_handle>(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<b200_ref_pll_ctrl>(_spi_iface); +        _adf4001_iface = std::make_shared<b200_ref_pll_ctrl>(_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<b2xxmini_ad9361_client_t>(); +        client_settings = std::make_shared<b2xxmini_ad9361_client_t>();      } else { -        client_settings = boost::make_shared<b200_ad9361_client_t>(); +        client_settings = std::make_shared<b200_ad9361_client_t>();      }      _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 <uhdlib/usrp/common/ad936x_manager.hpp>  #include <uhdlib/usrp/common/adf4001_ctrl.hpp>  #include <boost/assign.hpp> -#include <boost/weak_ptr.hpp>  #include <mutex> +#include <memory>  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<uhd::usrp::adf4001_ctrl> _adf4001_iface; +    std::shared_ptr<uhd::usrp::adf4001_ctrl> _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<uhd::rx_streamer> _rx_streamer; -    boost::weak_ptr<uhd::tx_streamer> _tx_streamer; +    std::weak_ptr<uhd::rx_streamer> _rx_streamer; +    std::weak_ptr<uhd::tx_streamer> _tx_streamer;      std::mutex _transport_setup_mutex; @@ -156,13 +156,13 @@ private:      typedef uhd::transport::bounded_buffer<uhd::async_metadata_t> async_md_type;      struct AsyncTaskData      { -        boost::shared_ptr<async_md_type> async_md; -        boost::weak_ptr<radio_ctrl_core_3000> local_ctrl; -        boost::weak_ptr<radio_ctrl_core_3000> radio_ctrl[2]; +        std::shared_ptr<async_md_type> async_md; +        std::weak_ptr<radio_ctrl_core_3000> local_ctrl; +        std::weak_ptr<radio_ctrl_core_3000> radio_ctrl[2];          b200_uart::sptr gpsdo_uart;      }; -    boost::shared_ptr<AsyncTaskData> _async_task_data; -    boost::optional<uhd::msg_task::msg_type_t> handle_async_task(uhd::transport::zero_copy_if::sptr, boost::shared_ptr<AsyncTaskData>); +    std::shared_ptr<AsyncTaskData> _async_task_data; +    boost::optional<uhd::msg_task::msg_type_t> handle_async_task(uhd::transport::zero_copy_if::sptr, std::shared_ptr<AsyncTaskData>);      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<uhd::rx_streamer> rx_streamer; -        boost::weak_ptr<uhd::tx_streamer> tx_streamer; +        std::weak_ptr<uhd::rx_streamer> rx_streamer; +        std::weak_ptr<uhd::tx_streamer> 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 <uhdlib/usrp/common/async_packet_handler.hpp>  #include <uhdlib/usrp/common/validate_subdev_spec.hpp>  #include <boost/bind.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <set>  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<sph::recv_packet_streamer> rx_streamer = -                boost::dynamic_pointer_cast<sph::recv_packet_streamer>( +            std::shared_ptr<sph::recv_packet_streamer> rx_streamer = +                std::dynamic_pointer_cast<sph::recv_packet_streamer>(                      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<sph::send_packet_streamer> tx_streamer = -                boost::dynamic_pointer_cast<sph::send_packet_streamer>( +            std::shared_ptr<sph::send_packet_streamer> tx_streamer = +                std::dynamic_pointer_cast<sph::send_packet_streamer>(                      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<sph::recv_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<sph::recv_packet_streamer>( +        std::shared_ptr<sph::recv_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<sph::recv_packet_streamer>(                  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<sph::send_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<sph::send_packet_streamer>( +        std::shared_ptr<sph::send_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<sph::send_packet_streamer>(                  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<sph::recv_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::recv_packet_streamer>( +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::recv_packet_streamer>(              _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<sph::send_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::send_packet_streamer>( +    std::shared_ptr<sph::send_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::send_packet_streamer>(              _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<uhd::msg_task::msg_type_t> b200_impl::handle_async_task( -    uhd::transport::zero_copy_if::sptr xport, boost::shared_ptr<AsyncTaskData> data) +    uhd::transport::zero_copy_if::sptr xport, std::shared_ptr<AsyncTaskData> 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<sph::recv_packet_streamer> my_streamer; +    std::shared_ptr<sph::recv_packet_streamer> my_streamer;      for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) {          const size_t radio_index =              _tree->access<std::vector<size_t>>("/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<sph::recv_packet_streamer>(spp); +            my_streamer = std::make_shared<sph::recv_packet_streamer>(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<sph::recv_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::recv_packet_streamer>( +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::recv_packet_streamer>(              _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<sph::send_packet_streamer> my_streamer; +    std::shared_ptr<sph::send_packet_streamer> my_streamer;      for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) {          const size_t radio_index =              _tree->access<std::vector<size_t>>("/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<sph::send_packet_streamer>(spp); +            my_streamer = std::make_shared<sph::send_packet_streamer>(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 <uhd/transport/zero_copy.hpp>  #include <uhd/types/serial.hpp> //uart iface  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  class b200_uart: uhd::noncopyable, public uhd::uart_iface  {  public: -    typedef boost::shared_ptr<b200_uart> sptr; +    typedef std::shared_ptr<b200_uart> 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 <uhd/utils/log.hpp>  #include <uhdlib/usrp/common/ad9361_ctrl.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <cstring>  #include <mutex> @@ -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<ad9361_io_spi> spi_io_iface = -        boost::make_shared<ad9361_io_spi>(spi_iface, slave_num); +    std::shared_ptr<ad9361_io_spi> spi_io_iface = +        std::make_shared<ad9361_io_spi>(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 <boost/shared_ptr.hpp> +#include <memory>  namespace uhd { namespace usrp { @@ -49,7 +49,7 @@ typedef struct {  class ad9361_params {  public: -    typedef boost::shared_ptr<ad9361_params> sptr; +    typedef std::shared_ptr<ad9361_params> sptr;      virtual ~ad9361_params() {} @@ -62,7 +62,7 @@ public:  class ad9361_io  {  public: -    typedef boost::shared_ptr<ad9361_io> sptr; +    typedef std::shared_ptr<ad9361_io> 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<int16_t> taps(taps_array, taps_array + sizeof(taps_array) / sizeof(int16_t) ); -    digital_filter_base<int16_t>::sptr hb_3 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_3(direction)); -    digital_filter_base<int16_t>::sptr dec_int_3 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_dec_int_3(direction)); +    digital_filter_base<int16_t>::sptr hb_3 = std::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_3(direction)); +    digital_filter_base<int16_t>::sptr dec_int_3 = std::dynamic_pointer_cast<digital_filter_base<int16_t> >(_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<int16_t>::sptr hb_2 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_2(direction)); +    digital_filter_base<int16_t>::sptr hb_2 = std::dynamic_pointer_cast<digital_filter_base<int16_t> >(_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<int16_t>::sptr hb_1 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_1(direction)); +    digital_filter_base<int16_t>::sptr hb_1 = std::dynamic_pointer_cast<digital_filter_base<int16_t> >(_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<int16_t>::sptr fir = boost::dynamic_pointer_cast<digital_filter_fir<int16_t> >(filter); +    digital_filter_fir<int16_t>::sptr fir = std::dynamic_pointer_cast<digital_filter_fir<int16_t> >(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<analog_filter_lp>(filter); +    analog_filter_lp::sptr lpf = std::dynamic_pointer_cast<analog_filter_lp>(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<analog_filter_lp>(filter); +    analog_filter_lp::sptr lpf = std::dynamic_pointer_cast<analog_filter_lp>(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 <uhd/utils/log.hpp>  #include <uhdlib/usrp/common/ad936x_manager.hpp>  #include <boost/functional/hash.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <chrono>  #include <cmath>  #include <thread> @@ -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<ad936x_manager_impl>(codec_ctrl, n_frontends); +    return std::make_shared<ad936x_manager_impl>(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 <uhd/exception.hpp>  #include <uhdlib/usrp/cores/spi_core_3000.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <chrono>  #include <mutex>  #include <thread> @@ -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<spi_core_3000_impl>( +    return std::make_shared<spi_core_3000_impl>(          [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<spi_core_3000_impl>( +    return std::make_shared<spi_core_3000_impl>(          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> sbx_versionx_sptr; +    typedef std::shared_ptr<sbx_versionx> 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 <uhd/utils/log.hpp>  #include <uhd/utils/static.hpp>  #include "dboard_ctor_args.hpp" -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread.hpp>  #include <boost/thread/mutex.hpp>  //#include <fstream>    //Needed for _expert->to_dot() below @@ -229,13 +229,13 @@ private:  class twinrx_rcvr : public rx_dboard_base  {  public: -    typedef boost::shared_ptr<twinrx_rcvr> sptr; +    typedef std::shared_ptr<twinrx_rcvr> sptr;      twinrx_rcvr(ctor_args_t args) : rx_dboard_base(args)      {          _db_iface = get_iface(); -        twinrx_gpio::sptr gpio_iface = boost::make_shared<twinrx_gpio>(_db_iface); -        twinrx_cpld_regmap::sptr cpld_regs = boost::make_shared<twinrx_cpld_regmap>(); +        twinrx_gpio::sptr gpio_iface = std::make_shared<twinrx_gpio>(_db_iface); +        twinrx_cpld_regmap::sptr cpld_regs = std::make_shared<twinrx_cpld_regmap>();          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<twinrx_rcvr>(db_args.rx_container); +        sptr container = std::dynamic_pointer_cast<twinrx_rcvr>(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 <uhd/utils/safe_call.hpp>  #include <uhdlib/usrp/common/max287x.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/math/special_functions/round.hpp>  #include <boost/algorithm/string.hpp>  #include <boost/thread/mutex.hpp> @@ -1329,10 +1329,10 @@ private:      ubx_cpld_reg_t _cpld_reg;      uint32_t _prev_cpld_value;      std::map<ubx_gpio_field_id_t,ubx_gpio_field_info_t> _gpio_map; -    boost::shared_ptr<max287x_iface> _txlo1; -    boost::shared_ptr<max287x_iface> _txlo2; -    boost::shared_ptr<max287x_iface> _rxlo1; -    boost::shared_ptr<max287x_iface> _rxlo2; +    std::shared_ptr<max287x_iface> _txlo1; +    std::shared_ptr<max287x_iface> _txlo2; +    std::shared_ptr<max287x_iface> _rxlo1; +    std::shared_ptr<max287x_iface> _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 <uhd/usrp/dboard_base.hpp>  #include <boost/assign/list_of.hpp>  #include <boost/format.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/math/special_functions/round.hpp>  #include <boost/bind.hpp> @@ -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> wbx_versionx_sptr; +    typedef std::shared_ptr<wbx_versionx> wbx_versionx_sptr;      wbx_versionx_sptr db_actual;      uhd::dict<std::string, double> _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 <uhd/types/serial.hpp>  #include <memory>  #include <mutex> +#include <functional>  //! 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 <uhd/rfnoc/registry.hpp>  #include <boost/algorithm/string.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <cmath>  #include <cstdlib>  #include <sstream> 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 <boost/algorithm/string.hpp>  #include <boost/algorithm/string/case_conv.hpp>  #include <boost/algorithm/string/split.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <string>  #include <vector> 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 <uhdlib/utils/narrow.hpp>  #include <boost/algorithm/string.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <cmath>  #include <cstdlib>  #include <sstream> 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<rhodium_radio_control_impl> sptr; +    typedef std::shared_ptr<rhodium_radio_control_impl> 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<twinrx_gpio> sptr; +    typedef std::shared_ptr<twinrx_gpio> 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<twinrx_cpld_regmap> sptr; +    typedef std::shared_ptr<twinrx_cpld_regmap> 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 <uhd/utils/static.hpp>  #include <uhd/utils/tasks.hpp>  #include <boost/algorithm/string.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread.hpp>  #include <chrono>  #include <future> @@ -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<mpmd_impl>(device_args)); +    return device::sptr(std::make_shared<mpmd_impl>(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 <boost/assign/list_of.hpp>  #include <boost/format.hpp>  #include <boost/algorithm/string.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <algorithm>  #include <cmath>  #include <bitset> @@ -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<rfnoc::detail::rfnoc_device>(dev); +    auto rfnoc_dev = std::dynamic_pointer_cast<rfnoc::detail::rfnoc_device>(dev);      if (rfnoc_dev) {          return rfnoc::detail::make_rfnoc_device(rfnoc_dev, dev_addr);      } -    return boost::make_shared<multi_usrp_impl>(dev); +    return std::make_shared<multi_usrp_impl>(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 <uhdlib/rfnoc/rfnoc_device.hpp>  #include <uhdlib/usrp/gpio_defs.hpp>  #include <unordered_set> -#include <boost/make_shared.hpp>  #include <boost/pointer_cast.hpp>  #include <algorithm>  #include <chrono> +#include <memory>  #include <mutex>  #include <thread>  #include <vector> @@ -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<multi_usrp_rfnoc>(graph, dev_addr); +    return std::make_shared<multi_usrp_rfnoc>(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 <uhd/types/serial.hpp>  #include <uhd/types/ranges.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  /*!   * The usrp1 codec control: @@ -20,7 +20,7 @@   */  class usrp1_codec_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<usrp1_codec_ctrl> sptr; +    typedef std::shared_ptr<usrp1_codec_ctrl> 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 <boost/thread/thread.hpp>  #include <boost/bind.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <atomic>  #include <chrono>  #include <thread> @@ -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<usrp1_recv_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<usrp1_recv_packet_streamer>(_rx_streamer.lock()); +        std::shared_ptr<usrp1_recv_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<usrp1_recv_packet_streamer>(_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<usrp1_send_packet_streamer> my_streamer = -            boost::dynamic_pointer_cast<usrp1_send_packet_streamer>(_tx_streamer.lock()); +        std::shared_ptr<usrp1_send_packet_streamer> my_streamer = +            std::dynamic_pointer_cast<usrp1_send_packet_streamer>(_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<usrp1_recv_packet_streamer> my_streamer = -        boost::make_shared<usrp1_recv_packet_streamer>(spp, _soft_time_ctrl); +    std::shared_ptr<usrp1_recv_packet_streamer> my_streamer = +        std::make_shared<usrp1_recv_packet_streamer>(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<void(bool)> tx_fcn = boost::bind(&usrp1_impl::tx_stream_on_off, this, _1); -    boost::shared_ptr<usrp1_send_packet_streamer> my_streamer = -        boost::make_shared<usrp1_send_packet_streamer>(spp, _soft_time_ctrl, tx_fcn); +    std::shared_ptr<usrp1_send_packet_streamer> my_streamer = +        std::make_shared<usrp1_send_packet_streamer>(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 <uhdlib/utils/system_time.hpp>  #include <uhd/utils/tasks.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <boost/thread/condition_variable.hpp>  #include <boost/date_time/posix_time/posix_time.hpp>  #include <iostream> @@ -116,7 +116,7 @@ public:      }      void issue_stream_cmd(const stream_cmd_t &cmd){ -        _cmd_queue.push_with_wait(boost::make_shared<stream_cmd_t>(cmd)); +        _cmd_queue.push_with_wait(std::make_shared<stream_cmd_t>(cmd));      }      void stream_on_off(bool enb){ @@ -190,7 +190,7 @@ public:      }      void recv_cmd_task(void){ //task is looped -        boost::shared_ptr<stream_cmd_t> cmd; +        std::shared_ptr<stream_cmd_t> 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<boost::shared_ptr<stream_cmd_t> > _cmd_queue; +    bounded_buffer<std::shared_ptr<stream_cmd_t> > _cmd_queue;      bounded_buffer<async_metadata_t> _async_msg_queue;      bounded_buffer<rx_metadata_t> _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 <uhd/types/metadata.hpp>  #include <uhd/transport/bounded_buffer.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/function.hpp>  namespace uhd{ namespace usrp{ @@ -27,7 +27,7 @@ namespace uhd{ namespace usrp{   */  class soft_time_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<soft_time_ctrl> sptr; +    typedef std::shared_ptr<soft_time_ctrl> sptr;      typedef boost::function<void(bool)> 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 <uhdlib/usrp/common/fx2_ctrl.hpp>  #include <uhd/types/wb_iface.hpp>  #include <uhd/types/serial.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/utils/noncopyable.hpp>  #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<usrp1_iface> sptr; +    typedef std::shared_ptr<usrp1_iface> 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 <uhd/device.hpp>  #include <uhd/property_tree.hpp> -#include <uhd/utils/pimpl.hpp> +#include <uhd/transport/usb_zero_copy.hpp>  #include <uhd/types/dict.hpp>  #include <uhd/types/stream_cmd.hpp> +#include <uhd/usrp/dboard_eeprom.hpp>  #include <uhd/usrp/dboard_id.hpp> +#include <uhd/usrp/dboard_manager.hpp>  #include <uhd/usrp/mboard_eeprom.hpp>  #include <uhd/usrp/subdev_spec.hpp> -#include <uhd/usrp/dboard_eeprom.hpp> -#include <uhd/usrp/dboard_manager.hpp> -#include <uhd/transport/usb_zero_copy.hpp> -#include <boost/weak_ptr.hpp> -#include <complex> +#include <uhd/utils/pimpl.hpp>  #include <atomic> +#include <complex> +#include <memory>  #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<uhd::rx_streamer> _rx_streamer; -    boost::weak_ptr<uhd::tx_streamer> _tx_streamer; +    std::weak_ptr<uhd::rx_streamer> _rx_streamer; +    std::weak_ptr<uhd::tx_streamer> _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 <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <vector>  class usrp2_clock_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<usrp2_clock_ctrl> sptr; +    typedef std::shared_ptr<usrp2_clock_ctrl> 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 <boost/shared_ptr.hpp> +#include <memory>  #include <uhd/utils/noncopyable.hpp>  class usrp2_codec_ctrl : uhd::noncopyable{  public: -    typedef boost::shared_ptr<usrp2_codec_ctrl> sptr; +    typedef std::shared_ptr<usrp2_codec_ctrl> 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 <boost/bind.hpp>  #include <boost/asio.hpp>  #include <boost/thread/mutex.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <iostream>  #include <chrono>  #include <thread> @@ -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<flow_control_monitor> sptr; +    typedef std::shared_ptr<flow_control_monitor> 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<sph::recv_packet_streamer> my_streamer = -                boost::dynamic_pointer_cast<sph::recv_packet_streamer>(_mbc[mb].rx_streamers[i].lock()); +            std::shared_ptr<sph::recv_packet_streamer> my_streamer = +                std::dynamic_pointer_cast<sph::recv_packet_streamer>(_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<sph::send_packet_streamer> my_streamer = -                boost::dynamic_pointer_cast<sph::send_packet_streamer>(_mbc[mb].tx_streamers[i].lock()); +            std::shared_ptr<sph::send_packet_streamer> my_streamer = +                std::dynamic_pointer_cast<sph::send_packet_streamer>(_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<sph::recv_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::recv_packet_streamer>(_mbc[mb].rx_streamers[dsp].lock()); +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::recv_packet_streamer>(_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<sph::send_packet_streamer> my_streamer = -        boost::dynamic_pointer_cast<sph::send_packet_streamer>(_mbc[mb].tx_streamers[dsp].lock()); +    std::shared_ptr<sph::send_packet_streamer> my_streamer = +        std::dynamic_pointer_cast<sph::send_packet_streamer>(_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<size_t>("spp", bpp/bpi);      //make the new streamer given the samples per packet -    boost::shared_ptr<sph::recv_packet_streamer> my_streamer = boost::make_shared<sph::recv_packet_streamer>(spp); +    std::shared_ptr<sph::recv_packet_streamer> my_streamer = std::make_shared<sph::recv_packet_streamer>(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<sph::send_packet_streamer> my_streamer = boost::make_shared<sph::send_packet_streamer>(spp); +    std::shared_ptr<sph::send_packet_streamer> my_streamer = std::make_shared<sph::send_packet_streamer>(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 <uhd/types/time_spec.hpp>  #include <uhd/types/serial.hpp>  #include <uhd/transport/zero_copy.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/utility.hpp>  #include <uhd/types/wb_iface.hpp>  #include <string> @@ -23,7 +23,7 @@  class usrp2_fifo_ctrl : public uhd::timed_wb_iface, public uhd::spi_iface  {  public: -    typedef boost::shared_ptr<usrp2_fifo_ctrl> sptr; +    typedef std::shared_ptr<usrp2_fifo_ctrl> 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 <uhd/transport/udp_simple.hpp>  #include <uhd/types/serial.hpp>  #include <uhd/usrp/mboard_eeprom.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/utility.hpp>  #include <boost/function.hpp>  #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<usrp2_iface> sptr; +    typedef std::shared_ptr<usrp2_iface> 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 <uhd/types/device_addr.hpp>  #include <uhd/usrp/dboard_manager.hpp>  #include <uhd/usrp/subdev_spec.hpp> -#include <boost/weak_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/function.hpp>  #include <atomic> @@ -84,8 +83,8 @@ private:          rx_frontend_core_200::sptr rx_fe;          tx_frontend_core_200::sptr tx_fe;          std::vector<rx_dsp_core_200::sptr> rx_dsps; -        std::vector<boost::weak_ptr<uhd::rx_streamer> > rx_streamers; -        std::vector<boost::weak_ptr<uhd::tx_streamer> > tx_streamers; +        std::vector<std::weak_ptr<uhd::rx_streamer> > rx_streamers; +        std::vector<std::weak_ptr<uhd::tx_streamer> > 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  class x300_adc_ctrl : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<x300_adc_ctrl> sptr; +    typedef std::shared_ptr<x300_adc_ctrl> 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  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<x300_clock_ctrl> sptr; +    typedef std::shared_ptr<x300_clock_ctrl> 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 <uhd/types/serial.hpp>  #include <uhd/utils/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  class x300_dac_ctrl : uhd::noncopyable  {  public: -    typedef boost::shared_ptr<x300_dac_ctrl> sptr; +    typedef std::shared_ptr<x300_dac_ctrl> 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 <uhd/utils/log.hpp>  #include <uhd/utils/platform.hpp>  #include <boost/thread.hpp> -#include <boost/make_shared.hpp> +#include <memory>  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<x300_mb_eeprom_iface_impl>(wb, i2c->eeprom16()); +    return std::make_shared<x300_mb_eeprom_iface_impl>(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 <uhd/config.hpp>  #include <uhd/types/serial.hpp>  #include <uhd/types/wb_iface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory>  #include <boost/utility.hpp>  class x300_mb_eeprom_iface : public uhd::i2c_iface  {  public: -    typedef boost::shared_ptr<x300_mb_eeprom_iface> sptr; +    typedef std::shared_ptr<x300_mb_eeprom_iface> 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<std::string, boost::weak_ptr<uhd::wb_iface>> +typedef std::unordered_map<std::string, std::weak_ptr<uhd::wb_iface>>      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<wb_iface>(zpu_ctrl); +    get_pcie_zpu_iface_registry()[_resource] = std::weak_ptr<wb_iface>(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 <uhdlib/usrp/cores/spi_core_3000.hpp>  #include <uhdlib/usrp/cores/tx_frontend_core_200.hpp>  #include <boost/algorithm/string.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <algorithm>  #include <chrono>  #include <functional> @@ -1492,7 +1492,7 @@ private:          // create a new dboard manager          RFNOC_LOG_TRACE("Creating DB interface..."); -        _db_iface = boost::make_shared<x300_dboard_iface>(db_config); +        _db_iface = std::make_shared<x300_dboard_iface>(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<x300_dboard_iface> _db_iface; +    std::shared_ptr<x300_dboard_iface> _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 <boost/shared_ptr.hpp> +#include <memory>  #include <boost/thread.hpp>  #include <uhd/device.hpp> 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 <uhd/exception.hpp>  #include <uhdlib/utils/ihex.hpp>  #include <boost/format.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <sstream>  #include <fstream> @@ -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<std::ofstream> output_file, +    std::shared_ptr<std::ofstream> 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<std::ofstream> output_file(boost::make_shared<std::ofstream>()); +    std::shared_ptr<std::ofstream> output_file(std::make_shared<std::ofstream>());      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 <uhd/version.hpp>  #include <uhdlib/utils/isatty.hpp>  #include <boost/date_time/posix_time/posix_time.hpp> -#include <boost/make_shared.hpp> +#include <memory>  #include <atomic>  #include <cctype>  #include <fstream>  | 
