aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-28 11:18:57 +0200
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commit1fe98e8701dd0b790b172762c3629db32956d1fc (patch)
tree7719e69633f9639f1dcdcf00ebf7db6c4cd6dda2 /host
parent8541a9b397fb53034c37dd00289aa96def24d410 (diff)
downloaduhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.gz
uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.tar.bz2
uhd-1fe98e8701dd0b790b172762c3629db32956d1fc.zip
uhd: Replace usage of boost smart pointers with C++11 counterparts
This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
Diffstat (limited to 'host')
-rw-r--r--host/examples/benchmark_streamer.cpp2
-rw-r--r--host/examples/network_relay.cpp16
-rw-r--r--host/examples/rfnoc_radio_loopback.cpp2
-rw-r--r--host/examples/txrx_loopback_to_file.cpp4
-rw-r--r--host/include/uhd/convert.hpp4
-rw-r--r--host/include/uhd/device.hpp4
-rw-r--r--host/include/uhd/property_tree.hpp16
-rw-r--r--host/include/uhd/property_tree.ipp18
-rw-r--r--host/include/uhd/rfnoc/block_id.hpp2
-rw-r--r--host/include/uhd/rfnoc/blockdef.hpp6
-rw-r--r--host/include/uhd/stream.hpp6
-rw-r--r--host/include/uhd/transport/buffer_pool.hpp4
-rw-r--r--host/include/uhd/transport/muxed_zero_copy_if.hpp2
-rw-r--r--host/include/uhd/transport/nirio/nifpga_lvbitx.h3
-rw-r--r--host/include/uhd/transport/nirio/nirio_fifo.h3
-rw-r--r--host/include/uhd/transport/nirio/nirio_resource_manager.h4
-rw-r--r--host/include/uhd/transport/nirio/niriok_proxy.h11
-rw-r--r--host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h1
-rw-r--r--host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h1
-rw-r--r--host/include/uhd/transport/nirio/niusrprio_session.h11
-rw-r--r--host/include/uhd/transport/nirio/rpc/rpc_client.hpp4
-rw-r--r--host/include/uhd/transport/nirio/rpc/rpc_common.hpp5
-rw-r--r--host/include/uhd/transport/nirio_zero_copy.hpp4
-rw-r--r--host/include/uhd/transport/tcp_zero_copy.hpp2
-rw-r--r--host/include/uhd/transport/udp_simple.hpp4
-rw-r--r--host/include/uhd/transport/udp_zero_copy.hpp4
-rw-r--r--host/include/uhd/transport/usb_control.hpp4
-rw-r--r--host/include/uhd/transport/usb_device_handle.hpp4
-rw-r--r--host/include/uhd/transport/usb_zero_copy.hpp2
-rw-r--r--host/include/uhd/transport/zero_copy.hpp4
-rw-r--r--host/include/uhd/transport/zero_copy_flow_ctrl.hpp4
-rw-r--r--host/include/uhd/types/filters.hpp12
-rw-r--r--host/include/uhd/types/serial.hpp8
-rw-r--r--host/include/uhd/types/wb_iface.hpp6
-rw-r--r--host/include/uhd/usrp/dboard_base.hpp4
-rw-r--r--host/include/uhd/usrp/dboard_iface.hpp4
-rw-r--r--host/include/uhd/usrp/dboard_manager.hpp4
-rw-r--r--host/include/uhd/usrp/gps_ctrl.hpp4
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp4
-rw-r--r--host/include/uhd/usrp_clock/multi_usrp_clock.hpp2
-rw-r--r--host/include/uhd/utils/gain_group.hpp4
-rw-r--r--host/include/uhd/utils/msg_task.hpp4
-rw-r--r--host/include/uhd/utils/pimpl.hpp6
-rw-r--r--host/include/uhd/utils/soft_register.hpp10
-rw-r--r--host/include/uhd/utils/tasks.hpp9
-rw-r--r--host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp4
-rw-r--r--host/lib/device.cpp4
-rw-r--r--host/lib/experts/expert_container.cpp17
-rw-r--r--host/lib/include/uhdlib/experts/expert_container.hpp4
-rw-r--r--host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp6
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp4
-rw-r--r--host/lib/include/uhdlib/transport/dpdk_zero_copy.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/common/ad936x_manager.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/common/adf435x.hpp2
-rw-r--r--host/lib/include/uhdlib/usrp/common/fx2_ctrl.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/common/max287x.hpp2
-rw-r--r--host/lib/include/uhdlib/usrp/common/recv_packet_demuxer.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/common/recv_packet_demuxer_3000.hpp6
-rw-r--r--host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp6
-rw-r--r--host/lib/include/uhdlib/usrp/cores/gpio_core_200.hpp6
-rw-r--r--host/lib/include/uhdlib/usrp/cores/i2c_core_100_wb32.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/i2c_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/radio_ctrl_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/rx_dsp_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/rx_dsp_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/rx_frontend_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/rx_vita_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/time64_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/time_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/tx_dsp_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/tx_dsp_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/tx_frontend_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/tx_vita_core_3000.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/user_settings_core_200.hpp4
-rw-r--r--host/lib/include/uhdlib/usrp/cores/user_settings_core_3000.hpp2
-rw-r--r--host/lib/property_tree.cpp16
-rw-r--r--host/lib/rfnoc/graph_stream_manager.cpp2
-rw-r--r--host/lib/rfnoc/rfnoc_graph.cpp12
-rw-r--r--host/lib/transport/dpdk_zero_copy.cpp2
-rw-r--r--host/lib/transport/libusb1_base.cpp6
-rw-r--r--host/lib/transport/libusb1_base.hpp14
-rw-r--r--host/lib/transport/libusb1_control.cpp2
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp12
-rw-r--r--host/lib/transport/muxed_zero_copy_if.cpp19
-rw-r--r--host/lib/transport/nirio_zero_copy.cpp12
-rw-r--r--host/lib/transport/super_recv_packet_handler.hpp2
-rw-r--r--host/lib/transport/tcp_zero_copy.cpp14
-rw-r--r--host/lib/transport/udp_wsa_zero_copy.cpp10
-rw-r--r--host/lib/transport/udp_zero_copy.cpp12
-rw-r--r--host/lib/transport/zero_copy_flow_ctrl.cpp16
-rw-r--r--host/lib/types/filters_python.hpp2
-rw-r--r--host/lib/usrp/b100/b100_impl.hpp8
-rw-r--r--host/lib/usrp/b100/clock_ctrl.hpp4
-rw-r--r--host/lib/usrp/b100/codec_ctrl.hpp4
-rw-r--r--host/lib/usrp/b100/fifo_ctrl_excelsior.hpp4
-rw-r--r--host/lib/usrp/b100/io_impl.cpp22
-rw-r--r--host/lib/usrp/b100/usb_zero_copy_wrapper.cpp10
-rw-r--r--host/lib/usrp/b200/b200_cores.hpp6
-rw-r--r--host/lib/usrp/b200/b200_iface.hpp4
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp11
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp22
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp40
-rw-r--r--host/lib/usrp/b200/b200_uart.hpp4
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp6
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_client.h6
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp14
-rw-r--r--host/lib/usrp/common/ad936x_manager.cpp4
-rw-r--r--host/lib/usrp/cores/spi_core_3000.cpp6
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp2
-rw-r--r--host/lib/usrp/dboard/db_twinrx.cpp10
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp10
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.hpp4
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_cpld_ctrl.hpp2
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control.cpp2
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_control_init.cpp2
-rw-r--r--host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp2
-rw-r--r--host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp2
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_io.hpp4
-rw-r--r--host/lib/usrp/mpmd/mpmd_impl.cpp4
-rw-r--r--host/lib/usrp/multi_usrp.cpp6
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp4
-rw-r--r--host/lib/usrp/usrp1/codec_ctrl.hpp4
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp18
-rw-r--r--host/lib/usrp/usrp1/soft_time_ctrl.cpp8
-rw-r--r--host/lib/usrp/usrp1/soft_time_ctrl.hpp4
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.hpp4
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp18
-rw-r--r--host/lib/usrp/usrp2/clock_ctrl.hpp4
-rw-r--r--host/lib/usrp/usrp2/codec_ctrl.hpp4
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp24
-rw-r--r--host/lib/usrp/usrp2/usrp2_fifo_ctrl.hpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp7
-rw-r--r--host/lib/usrp/x300/x300_adc_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_clock_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.cpp4
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.hpp4
-rw-r--r--host/lib/usrp/x300/x300_pcie_mgr.cpp4
-rw-r--r--host/lib/usrp/x300/x300_radio_control.cpp6
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.hpp2
-rw-r--r--host/lib/utils/ihex.cpp6
-rw-r--r--host/lib/utils/log.cpp2
-rw-r--r--host/python/pyuhd.cpp5
-rw-r--r--host/tests/common/mock_zero_copy.cpp2
-rw-r--r--host/tests/common/mock_zero_copy.hpp6
-rw-r--r--host/tests/expert_test.cpp8
-rw-r--r--host/tests/packet_handler_benchmark.cpp16
-rw-r--r--host/tests/rx_streamer_test.cpp6
-rw-r--r--host/tests/sph_recv_test.cpp10
-rw-r--r--host/tests/streamer_benchmark.cpp18
-rw-r--r--host/tests/tx_streamer_test.cpp10
-rw-r--r--host/utils/latency/responder.cpp2
156 files changed, 492 insertions, 505 deletions
diff --git a/host/examples/benchmark_streamer.cpp b/host/examples/benchmark_streamer.cpp
index c2f3a4b2c..093d4254f 100644
--- a/host/examples/benchmark_streamer.cpp
+++ b/host/examples/benchmark_streamer.cpp
@@ -514,7 +514,7 @@ test_results benchmark_tx_streamer(uhd::device3::sptr usrp,
const double duration,
const std::string& format)
{
- std::vector<boost::shared_ptr<uhd::rfnoc::null_block_ctrl>> null_ctrls;
+ std::vector<std::shared_ptr<uhd::rfnoc::null_block_ctrl>> null_ctrls;
for (const auto& id : null_ids) {
null_ctrls.push_back(usrp->get_block_ctrl<uhd::rfnoc::null_block_ctrl>(id));
}
diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp
index bf2ac9255..6de268aa9 100644
--- a/host/examples/network_relay.cpp
+++ b/host/examples/network_relay.cpp
@@ -22,7 +22,7 @@
namespace po = boost::program_options;
namespace asio = boost::asio;
-typedef boost::shared_ptr<asio::ip::udp::socket> socket_type;
+typedef std::shared_ptr<asio::ip::udp::socket> socket_type;
static const size_t insane_mtu = 9000;
@@ -81,7 +81,7 @@ public:
asio::ip::udp::resolver::query query(asio::ip::udp::v4(), server_addr, port);
asio::ip::udp::endpoint endpoint = *resolver.resolve(query);
- _server_socket = boost::shared_ptr<asio::ip::udp::socket>(
+ _server_socket = std::shared_ptr<asio::ip::udp::socket>(
new asio::ip::udp::socket(_io_service, endpoint));
resize_buffs(_server_socket, server_rx_size, server_tx_size);
}
@@ -90,7 +90,7 @@ public:
asio::ip::udp::resolver::query query(asio::ip::udp::v4(), client_addr, port);
asio::ip::udp::endpoint endpoint = *resolver.resolve(query);
- _client_socket = boost::shared_ptr<asio::ip::udp::socket>(
+ _client_socket = std::shared_ptr<asio::ip::udp::socket>(
new asio::ip::udp::socket(_io_service));
_client_socket->open(asio::ip::udp::v4());
_client_socket->connect(endpoint);
@@ -215,14 +215,14 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
}
{
- boost::shared_ptr<udp_relay_type> ctrl(new udp_relay_type(bind, addr, "49152"));
- boost::shared_ptr<udp_relay_type> rxdsp0(new udp_relay_type(
+ std::shared_ptr<udp_relay_type> ctrl(new udp_relay_type(bind, addr, "49152"));
+ std::shared_ptr<udp_relay_type> rxdsp0(new udp_relay_type(
bind, addr, "49156", 0, tx_dsp_buff_size, rx_dsp_buff_size, 0));
- boost::shared_ptr<udp_relay_type> txdsp0(new udp_relay_type(
+ std::shared_ptr<udp_relay_type> txdsp0(new udp_relay_type(
bind, addr, "49157", tx_dsp_buff_size, 0, 0, tx_dsp_buff_size));
- boost::shared_ptr<udp_relay_type> rxdsp1(new udp_relay_type(
+ std::shared_ptr<udp_relay_type> rxdsp1(new udp_relay_type(
bind, addr, "49158", 0, tx_dsp_buff_size, rx_dsp_buff_size, 0));
- boost::shared_ptr<udp_relay_type> gps(new udp_relay_type(bind, addr, "49172"));
+ std::shared_ptr<udp_relay_type> gps(new udp_relay_type(bind, addr, "49172"));
std::signal(SIGINT, &sig_int_handler);
std::cout << "Press Ctrl + C to stop streaming..." << std::endl;
diff --git a/host/examples/rfnoc_radio_loopback.cpp b/host/examples/rfnoc_radio_loopback.cpp
index dffe30b3b..707c957e2 100644
--- a/host/examples/rfnoc_radio_loopback.cpp
+++ b/host/examples/rfnoc_radio_loopback.cpp
@@ -88,7 +88,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
std::cout << std::endl;
std::cout << boost::format("Creating the usrp device with: %s...") % args
<< std::endl;
- auto dev = boost::dynamic_pointer_cast<uhd::device3>(uhd::device::make(args));
+ auto dev = std::dynamic_pointer_cast<uhd::device3>(uhd::device::make(args));
if (not dev) {
std::cout << "Error: Could not find an RFNoC-compatible device." << std::endl;
return EXIT_FAILURE;
diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp
index 271d249f6..6199ca429 100644
--- a/host/examples/txrx_loopback_to_file.cpp
+++ b/host/examples/txrx_loopback_to_file.cpp
@@ -117,10 +117,10 @@ void recv_to_file(uhd::usrp::multi_usrp::sptr usrp,
// Create one ofstream object per channel
// (use shared_ptr because ofstream is non-copyable)
- std::vector<boost::shared_ptr<std::ofstream>> outfiles;
+ std::vector<std::shared_ptr<std::ofstream>> outfiles;
for (size_t i = 0; i < buffs.size(); i++) {
const std::string this_filename = generate_out_filename(file, buffs.size(), i);
- outfiles.push_back(boost::shared_ptr<std::ofstream>(
+ outfiles.push_back(std::shared_ptr<std::ofstream>(
new std::ofstream(this_filename.c_str(), std::ofstream::binary)));
}
UHD_ASSERT_THROW(outfiles.size() == buffs.size());
diff --git a/host/include/uhd/convert.hpp b/host/include/uhd/convert.hpp
index 3af7cc47b..4d84fcdaa 100644
--- a/host/include/uhd/convert.hpp
+++ b/host/include/uhd/convert.hpp
@@ -12,7 +12,7 @@
#include <uhd/types/ref_vector.hpp>
#include <boost/function.hpp>
#include <boost/operators.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
namespace uhd { namespace convert {
@@ -21,7 +21,7 @@ namespace uhd { namespace convert {
class converter
{
public:
- typedef boost::shared_ptr<converter> sptr;
+ typedef std::shared_ptr<converter> sptr;
typedef uhd::ref_vector<void*> output_type;
typedef uhd::ref_vector<const void*> input_type;
diff --git a/host/include/uhd/device.hpp b/host/include/uhd/device.hpp
index 44f74b210..11bedf216 100644
--- a/host/include/uhd/device.hpp
+++ b/host/include/uhd/device.hpp
@@ -14,7 +14,7 @@
#include <uhd/types/device_addr.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd {
@@ -27,7 +27,7 @@ class property_tree; // forward declaration
class UHD_API device : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<device> sptr;
+ typedef std::shared_ptr<device> sptr;
typedef boost::function<device_addrs_t(const device_addr_t&)> find_t;
typedef boost::function<sptr(const device_addr_t&)> make_t;
diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp
index d97a5505e..4a839f8e9 100644
--- a/host/include/uhd/property_tree.hpp
+++ b/host/include/uhd/property_tree.hpp
@@ -12,10 +12,10 @@
#include <uhd/config.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
+#include <memory>
#include <typeindex>
#include <vector>
+#include <string>
namespace uhd {
@@ -215,7 +215,7 @@ UHD_API fs_path operator/(const fs_path&, size_t);
class UHD_API property_tree : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<property_tree> sptr;
+ typedef std::shared_ptr<property_tree> sptr;
enum coerce_mode_t { AUTO_COERCE, MANUAL_COERCE };
@@ -246,21 +246,21 @@ public:
//! Pop a property off the tree, and returns the property
template <typename T>
- boost::shared_ptr<property<T> > pop(const fs_path& path);
+ std::shared_ptr<property<T> > pop(const fs_path& path);
private:
//! Internal pop function
- virtual boost::shared_ptr<void> _pop(const fs_path& path) = 0;
+ virtual std::shared_ptr<void> _pop(const fs_path& path) = 0;
//! Internal create property with wild-card type
- virtual void _create(const fs_path& path, const boost::shared_ptr<void>& prop,
+ virtual void _create(const fs_path& path, const std::shared_ptr<void>& prop,
std::type_index prop_type) = 0;
//! Internal access property with wild-card type
- virtual boost::shared_ptr<void>& _access(const fs_path& path) const = 0;
+ virtual std::shared_ptr<void>& _access(const fs_path& path) const = 0;
//! Internal access property with wild-card type but with type verification
- virtual boost::shared_ptr<void>& _access_with_type_check(
+ virtual std::shared_ptr<void>& _access_with_type_check(
const fs_path& path, std::type_index expected_prop_type) const = 0;
};
diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp
index 20ad43fb1..3bae2a451 100644
--- a/host/include/uhd/property_tree.ipp
+++ b/host/include/uhd/property_tree.ipp
@@ -11,9 +11,9 @@
#include <uhd/exception.hpp>
#include <boost/foreach.hpp>
-#include <boost/scoped_ptr.hpp>
#include <typeindex>
#include <vector>
+#include <memory>
/***********************************************************************
* Implement templated property impl
@@ -147,7 +147,7 @@ private:
return value;
}
- static void init_or_set_value(boost::scoped_ptr<T>& scoped_value, const T& init_val)
+ static void init_or_set_value(std::unique_ptr<T>& scoped_value, const T& init_val)
{
if (scoped_value.get() == NULL) {
scoped_value.reset(new T(init_val));
@@ -156,7 +156,7 @@ private:
}
}
- static const T& get_value_ref(const boost::scoped_ptr<T>& scoped_value)
+ static const T& get_value_ref(const std::unique_ptr<T>& scoped_value)
{
if (scoped_value.get() == NULL)
throw uhd::assertion_error("Cannot use uninitialized property data");
@@ -168,8 +168,8 @@ private:
std::vector<typename property<T>::subscriber_type> _coerced_subscribers;
typename property<T>::publisher_type _publisher;
typename property<T>::coercer_type _coercer;
- boost::scoped_ptr<T> _value;
- boost::scoped_ptr<T> _coerced_value;
+ std::unique_ptr<T> _value;
+ std::unique_ptr<T> _coerced_value;
};
}} // namespace uhd::
@@ -183,7 +183,7 @@ template <typename T>
property<T>& property_tree::create(const fs_path& path, coerce_mode_t coerce_mode)
{
this->_create(path,
- typename boost::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)),
+ typename std::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)),
std::type_index(typeid(T)));
return this->access<T>(path);
}
@@ -191,14 +191,14 @@ property<T>& property_tree::create(const fs_path& path, coerce_mode_t coerce_mod
template <typename T>
property<T>& property_tree::access(const fs_path& path)
{
- return *boost::static_pointer_cast<property<T> >(
+ return *std::static_pointer_cast<property<T> >(
this->_access_with_type_check(path, std::type_index(typeid(T))));
}
template <typename T>
-typename boost::shared_ptr<property<T> > property_tree::pop(const fs_path& path)
+typename std::shared_ptr<property<T> > property_tree::pop(const fs_path& path)
{
- return boost::static_pointer_cast<property<T> >(this->_pop(path));
+ return std::static_pointer_cast<property<T> >(this->_pop(path));
}
} // namespace uhd
diff --git a/host/include/uhd/rfnoc/block_id.hpp b/host/include/uhd/rfnoc/block_id.hpp
index 106fb394f..d15220aa7 100644
--- a/host/include/uhd/rfnoc/block_id.hpp
+++ b/host/include/uhd/rfnoc/block_id.hpp
@@ -10,7 +10,7 @@
#include <uhd/config.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <iostream>
#include <string>
diff --git a/host/include/uhd/rfnoc/blockdef.hpp b/host/include/uhd/rfnoc/blockdef.hpp
index e35c8e234..d6bcec414 100644
--- a/host/include/uhd/rfnoc/blockdef.hpp
+++ b/host/include/uhd/rfnoc/blockdef.hpp
@@ -11,18 +11,18 @@
#include <uhd/config.hpp>
#include <uhd/types/device_addr.hpp>
#include <stdint.h>
-#include <boost/enable_shared_from_this.hpp>
#include <set>
#include <vector>
+#include <memory>
namespace uhd { namespace rfnoc {
/*! Reads and stores block definitions for blocks and components.
*/
-class UHD_API blockdef : public boost::enable_shared_from_this<blockdef>
+class UHD_API blockdef : public std::enable_shared_from_this<blockdef>
{
public:
- typedef boost::shared_ptr<blockdef> sptr;
+ typedef std::shared_ptr<blockdef> sptr;
//! Describes port options for a block definition.
//
diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp
index 7abab5b3c..5cbb652d6 100644
--- a/host/include/uhd/stream.hpp
+++ b/host/include/uhd/stream.hpp
@@ -14,7 +14,7 @@
#include <uhd/types/ref_vector.hpp>
#include <uhd/types/stream_cmd.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/utility.hpp>
#include <string>
#include <vector>
@@ -170,7 +170,7 @@ struct UHD_API stream_args_t
class UHD_API rx_streamer : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<rx_streamer> sptr;
+ typedef std::shared_ptr<rx_streamer> sptr;
virtual ~rx_streamer(void);
@@ -248,7 +248,7 @@ public:
class UHD_API tx_streamer : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<tx_streamer> sptr;
+ typedef std::shared_ptr<tx_streamer> sptr;
virtual ~tx_streamer(void);
diff --git a/host/include/uhd/transport/buffer_pool.hpp b/host/include/uhd/transport/buffer_pool.hpp
index 53949cbaf..125d5b8e3 100644
--- a/host/include/uhd/transport/buffer_pool.hpp
+++ b/host/include/uhd/transport/buffer_pool.hpp
@@ -10,7 +10,7 @@
#include <uhd/config.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
@@ -21,7 +21,7 @@ namespace uhd { namespace transport {
class UHD_API buffer_pool : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<buffer_pool> sptr;
+ typedef std::shared_ptr<buffer_pool> sptr;
typedef void* ptr_type;
virtual ~buffer_pool(void) = 0;
diff --git a/host/include/uhd/transport/muxed_zero_copy_if.hpp b/host/include/uhd/transport/muxed_zero_copy_if.hpp
index d8230aaf9..61086fbba 100644
--- a/host/include/uhd/transport/muxed_zero_copy_if.hpp
+++ b/host/include/uhd/transport/muxed_zero_copy_if.hpp
@@ -28,7 +28,7 @@ namespace uhd { namespace transport {
class muxed_zero_copy_if : private uhd::noncopyable
{
public:
- typedef boost::shared_ptr<muxed_zero_copy_if> sptr;
+ typedef std::shared_ptr<muxed_zero_copy_if> sptr;
/*!
* Function to classify the stream based on the payload.
diff --git a/host/include/uhd/transport/nirio/nifpga_lvbitx.h b/host/include/uhd/transport/nirio/nifpga_lvbitx.h
index 1b27b67e0..a66e8fcc3 100644
--- a/host/include/uhd/transport/nirio/nifpga_lvbitx.h
+++ b/host/include/uhd/transport/nirio/nifpga_lvbitx.h
@@ -10,13 +10,12 @@
#include <uhd/transport/nirio/nirio_resource_manager.h>
#include <uhd/transport/nirio/niriok_proxy.h>
-#include <boost/smart_ptr.hpp>
namespace uhd { namespace niusrprio {
class UHD_API nifpga_lvbitx {
public:
- typedef boost::shared_ptr<nifpga_lvbitx> sptr;
+ typedef std::shared_ptr<nifpga_lvbitx> sptr;
virtual ~nifpga_lvbitx() {};
diff --git a/host/include/uhd/transport/nirio/nirio_fifo.h b/host/include/uhd/transport/nirio/nirio_fifo.h
index 317ca777d..405e6c41d 100644
--- a/host/include/uhd/transport/nirio/nirio_fifo.h
+++ b/host/include/uhd/transport/nirio/nirio_fifo.h
@@ -14,7 +14,6 @@
#include <uhd/transport/nirio/niriok_proxy.h>
#include <uhd/transport/nirio/status.h>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/smart_ptr.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <atomic>
#include <string>
@@ -34,7 +33,7 @@ template <typename data_t>
class nirio_fifo : private uhd::noncopyable
{
public:
- typedef boost::shared_ptr< nirio_fifo<data_t> > sptr;
+ typedef std::shared_ptr< nirio_fifo<data_t> > sptr;
typedef enum {
MINIMIZE_LATENCY,
diff --git a/host/include/uhd/transport/nirio/nirio_resource_manager.h b/host/include/uhd/transport/nirio/nirio_resource_manager.h
index de9c5f3fc..e1562419f 100644
--- a/host/include/uhd/transport/nirio/nirio_resource_manager.h
+++ b/host/include/uhd/transport/nirio/nirio_resource_manager.h
@@ -58,7 +58,7 @@ public:
nirio_status get_register_offset(const char* register_name, uint32_t& offset);
template<typename data_t>
- nirio_status create_tx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo<data_t> >& fifo)
+ nirio_status create_tx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo<data_t> >& fifo)
{
nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name);
if (fifo_info_ptr) {
@@ -74,7 +74,7 @@ public:
}
template<typename data_t>
- nirio_status create_rx_fifo(const char* fifo_name, boost::shared_ptr< nirio_fifo<data_t> >& fifo)
+ nirio_status create_rx_fifo(const char* fifo_name, std::shared_ptr< nirio_fifo<data_t> >& fifo)
{
nirio_fifo_info_t* fifo_info_ptr = _lookup_fifo_info(fifo_name);
if (fifo_info_ptr) {
diff --git a/host/include/uhd/transport/nirio/niriok_proxy.h b/host/include/uhd/transport/nirio/niriok_proxy.h
index 8bd877e30..13cf172fa 100644
--- a/host/include/uhd/transport/nirio/niriok_proxy.h
+++ b/host/include/uhd/transport/nirio/niriok_proxy.h
@@ -8,13 +8,12 @@
#ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H
#define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_INTERFACE_H
-#include <stdint.h>
-#include <boost/smart_ptr.hpp>
-#include <uhd/utils/noncopyable.hpp>
-#include <boost/thread/shared_mutex.hpp>
-#include <boost/thread/locks.hpp>
#include <uhd/transport/nirio/nirio_driver_iface.h>
#include <uhd/transport/nirio/nirio_quirks.h>
+#include <uhd/utils/noncopyable.hpp>
+#include <stdint.h>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/shared_mutex.hpp>
#define NI_VENDOR_NUM 0x1093
@@ -135,7 +134,7 @@ namespace uhd { namespace niusrprio
class UHD_API niriok_proxy : public uhd::noncopyable {
public:
- typedef boost::shared_ptr<niriok_proxy> sptr;
+ typedef std::shared_ptr<niriok_proxy> sptr;
static sptr make_and_open(const std::string& interface_path);
diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h
index edeadc34d..b659cffab 100644
--- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h
+++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v1.h
@@ -8,7 +8,6 @@
#ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H
#define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V1_H
-#include <boost/smart_ptr.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <uhd/transport/nirio/nirio_driver_iface.h>
#include <uhd/transport/nirio/nirio_quirks.h>
diff --git a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h
index 31013fbfc..0f49749de 100644
--- a/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h
+++ b/host/include/uhd/transport/nirio/niriok_proxy_impl_v2.h
@@ -8,7 +8,6 @@
#ifndef INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H
#define INCLUDED_UHD_TRANSPORT_NIRIO_NIRIO_PROXY_IMPL_V2_H
-#include <boost/smart_ptr.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <uhd/transport/nirio/nirio_driver_iface.h>
#include <uhd/transport/nirio/nirio_quirks.h>
diff --git a/host/include/uhd/transport/nirio/niusrprio_session.h b/host/include/uhd/transport/nirio/niusrprio_session.h
index 2154c41f1..2fff0ac36 100644
--- a/host/include/uhd/transport/nirio/niusrprio_session.h
+++ b/host/include/uhd/transport/nirio/niusrprio_session.h
@@ -15,7 +15,6 @@
#include <uhd/transport/nirio/rpc/usrprio_rpc_client.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <stdint.h>
-#include <boost/smart_ptr.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <string>
@@ -24,7 +23,7 @@ namespace uhd { namespace niusrprio {
class UHD_API niusrprio_session : private uhd::noncopyable
{
public:
- typedef boost::shared_ptr<niusrprio_session> sptr;
+ typedef std::shared_ptr<niusrprio_session> sptr;
typedef uhd::usrprio_rpc::usrprio_device_info device_info;
typedef uhd::usrprio_rpc::usrprio_device_info_vtr device_info_vtr;
@@ -42,7 +41,7 @@ public:
template <typename data_t>
nirio_status create_tx_fifo(
- const char* fifo_name, boost::shared_ptr<nirio_fifo<data_t>>& fifo)
+ const char* fifo_name, std::shared_ptr<nirio_fifo<data_t>>& fifo)
{
if (!_session_open)
return NiRio_Status_ResourceNotInitialized;
@@ -51,7 +50,7 @@ public:
template <typename data_t>
nirio_status create_tx_fifo(
- uint32_t fifo_instance, boost::shared_ptr<nirio_fifo<data_t>>& fifo)
+ uint32_t fifo_instance, std::shared_ptr<nirio_fifo<data_t>>& fifo)
{
if ((size_t)fifo_instance >= _lvbitx->get_output_fifo_count())
return NiRio_Status_InvalidParameter;
@@ -60,7 +59,7 @@ public:
template <typename data_t>
nirio_status create_rx_fifo(
- const char* fifo_name, boost::shared_ptr<nirio_fifo<data_t>>& fifo)
+ const char* fifo_name, std::shared_ptr<nirio_fifo<data_t>>& fifo)
{
if (!_session_open)
return NiRio_Status_ResourceNotInitialized;
@@ -69,7 +68,7 @@ public:
template <typename data_t>
nirio_status create_rx_fifo(
- uint32_t fifo_instance, boost::shared_ptr<nirio_fifo<data_t>>& fifo)
+ uint32_t fifo_instance, std::shared_ptr<nirio_fifo<data_t>>& fifo)
{
if ((size_t)fifo_instance >= _lvbitx->get_input_fifo_count())
return NiRio_Status_InvalidParameter;
diff --git a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp
index 80ba20320..04f560e6a 100644
--- a/host/include/uhd/transport/nirio/rpc/rpc_client.hpp
+++ b/host/include/uhd/transport/nirio/rpc/rpc_client.hpp
@@ -12,9 +12,9 @@
#include <uhd/utils/log.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/asio.hpp>
-#include <boost/smart_ptr.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/thread.hpp>
+#include <memory>
namespace uhd { namespace usrprio_rpc {
@@ -68,7 +68,7 @@ private:
// Services
boost::asio::io_service _io_service;
- boost::scoped_ptr<boost::thread> _io_service_thread;
+ std::unique_ptr<boost::thread> _io_service_thread;
boost::asio::ip::tcp::socket _socket;
// Handshake info
hshake_args_t _hshake_args_client;
diff --git a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp
index 2384c0f61..9be1d024c 100644
--- a/host/include/uhd/transport/nirio/rpc/rpc_common.hpp
+++ b/host/include/uhd/transport/nirio/rpc/rpc_common.hpp
@@ -22,6 +22,7 @@
# include <boost/archive/text_oarchive.hpp>
#endif
#include <stdint.h>
+#include <memory>
namespace uhd { namespace usrprio_rpc {
@@ -131,9 +132,9 @@ public:
private:
std::istringstream _stream;
#if (USE_BINARY_ARCHIVE)
- boost::scoped_ptr<boost::archive::binary_iarchive> _archive;
+ std::unique_ptr<boost::archive::binary_iarchive> _archive;
#else
- boost::scoped_ptr<boost::archive::text_iarchive> _archive;
+ std::unique_ptr<boost::archive::text_iarchive> _archive;
#endif
};
diff --git a/host/include/uhd/transport/nirio_zero_copy.hpp b/host/include/uhd/transport/nirio_zero_copy.hpp
index b5e4dea38..096f592a8 100644
--- a/host/include/uhd/transport/nirio_zero_copy.hpp
+++ b/host/include/uhd/transport/nirio_zero_copy.hpp
@@ -13,14 +13,14 @@
#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/device_addr.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
class UHD_API nirio_zero_copy : public virtual zero_copy_if
{
public:
- typedef boost::shared_ptr<nirio_zero_copy> sptr;
+ typedef std::shared_ptr<nirio_zero_copy> sptr;
static sptr make(uhd::niusrprio::niusrprio_session::sptr fpga_session,
const uint32_t instance,
diff --git a/host/include/uhd/transport/tcp_zero_copy.hpp b/host/include/uhd/transport/tcp_zero_copy.hpp
index 4db68cec8..b1d052513 100644
--- a/host/include/uhd/transport/tcp_zero_copy.hpp
+++ b/host/include/uhd/transport/tcp_zero_copy.hpp
@@ -11,7 +11,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/device_addr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
diff --git a/host/include/uhd/transport/udp_simple.hpp b/host/include/uhd/transport/udp_simple.hpp
index a936cb204..52395d544 100644
--- a/host/include/uhd/transport/udp_simple.hpp
+++ b/host/include/uhd/transport/udp_simple.hpp
@@ -12,14 +12,14 @@
#include <uhd/types/serial.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/asio/buffer.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
class UHD_API udp_simple : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<udp_simple> sptr;
+ typedef std::shared_ptr<udp_simple> sptr;
virtual ~udp_simple(void) = 0;
diff --git a/host/include/uhd/transport/udp_zero_copy.hpp b/host/include/uhd/transport/udp_zero_copy.hpp
index 2fedad99a..3fb3fc396 100644
--- a/host/include/uhd/transport/udp_zero_copy.hpp
+++ b/host/include/uhd/transport/udp_zero_copy.hpp
@@ -11,7 +11,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/device_addr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
@@ -34,7 +34,7 @@ public:
size_t send_buff_size;
};
- typedef boost::shared_ptr<udp_zero_copy> sptr;
+ typedef std::shared_ptr<udp_zero_copy> sptr;
/*!
* Make a new zero copy udp transport:
diff --git a/host/include/uhd/transport/usb_control.hpp b/host/include/uhd/transport/usb_control.hpp
index fb37dc9fe..a6ad1e1c9 100644
--- a/host/include/uhd/transport/usb_control.hpp
+++ b/host/include/uhd/transport/usb_control.hpp
@@ -10,14 +10,14 @@
#include <uhd/transport/usb_device_handle.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
class UHD_API usb_control : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<usb_control> sptr;
+ typedef std::shared_ptr<usb_control> sptr;
virtual ~usb_control(void);
diff --git a/host/include/uhd/transport/usb_device_handle.hpp b/host/include/uhd/transport/usb_device_handle.hpp
index a4eeae510..b0dea1b77 100644
--- a/host/include/uhd/transport/usb_device_handle.hpp
+++ b/host/include/uhd/transport/usb_device_handle.hpp
@@ -11,7 +11,7 @@
#include <uhd/config.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include <vector>
@@ -32,7 +32,7 @@ namespace uhd { namespace transport {
class UHD_API usb_device_handle : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<usb_device_handle> sptr;
+ typedef std::shared_ptr<usb_device_handle> sptr;
typedef std::pair<uint16_t, uint16_t> vid_pid_pair_t;
virtual ~usb_device_handle(void);
diff --git a/host/include/uhd/transport/usb_zero_copy.hpp b/host/include/uhd/transport/usb_zero_copy.hpp
index d78807768..ecb3ff148 100644
--- a/host/include/uhd/transport/usb_zero_copy.hpp
+++ b/host/include/uhd/transport/usb_zero_copy.hpp
@@ -27,7 +27,7 @@ namespace uhd { namespace transport {
class UHD_API usb_zero_copy : public virtual zero_copy_if
{
public:
- typedef boost::shared_ptr<usb_zero_copy> sptr;
+ typedef std::shared_ptr<usb_zero_copy> sptr;
virtual ~usb_zero_copy(void);
diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp
index c59213e92..a28398445 100644
--- a/host/include/uhd/transport/zero_copy.hpp
+++ b/host/include/uhd/transport/zero_copy.hpp
@@ -12,7 +12,7 @@
#include <uhd/utils/noncopyable.hpp>
#include <boost/detail/atomic_count.hpp>
#include <boost/intrusive_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/utility.hpp>
namespace uhd { namespace transport {
@@ -148,7 +148,7 @@ struct zero_copy_xport_params
class UHD_API zero_copy_if : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<zero_copy_if> sptr;
+ typedef std::shared_ptr<zero_copy_if> sptr;
/*!
* Clean up tasks before releasing the transport object.
diff --git a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp
index f98a0891c..f12aed2a9 100644
--- a/host/include/uhd/transport/zero_copy_flow_ctrl.hpp
+++ b/host/include/uhd/transport/zero_copy_flow_ctrl.hpp
@@ -11,7 +11,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd { namespace transport {
@@ -28,7 +28,7 @@ typedef boost::function<bool(managed_buffer::sptr buff)> flow_ctrl_func;
class UHD_API zero_copy_flow_ctrl : public virtual zero_copy_if
{
public:
- typedef boost::shared_ptr<zero_copy_flow_ctrl> sptr;
+ typedef std::shared_ptr<zero_copy_flow_ctrl> sptr;
/*!
* Make flow controlled transport.
diff --git a/host/include/uhd/types/filters.hpp b/host/include/uhd/types/filters.hpp
index ff72dd5e3..d15002c0e 100644
--- a/host/include/uhd/types/filters.hpp
+++ b/host/include/uhd/types/filters.hpp
@@ -12,7 +12,7 @@
#include <uhd/utils/log.hpp>
#include <stdint.h>
#include <boost/scoped_array.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <iostream>
#include <ostream>
#include <sstream>
@@ -24,7 +24,7 @@ namespace uhd {
class UHD_API filter_info_base
{
public:
- typedef boost::shared_ptr<filter_info_base> sptr;
+ typedef std::shared_ptr<filter_info_base> sptr;
enum filter_type { ANALOG_LOW_PASS, ANALOG_BAND_PASS, DIGITAL_I16, DIGITAL_FIR_I16 };
filter_info_base(filter_type type, bool bypass, size_t position_index)
@@ -63,7 +63,7 @@ class UHD_API analog_filter_base : public filter_info_base
std::string _analog_type;
public:
- typedef boost::shared_ptr<analog_filter_base> sptr;
+ typedef std::shared_ptr<analog_filter_base> sptr;
analog_filter_base(filter_type type,
bool bypass,
size_t position_index,
@@ -87,7 +87,7 @@ class UHD_API analog_filter_lp : public analog_filter_base
double _rolloff;
public:
- typedef boost::shared_ptr<analog_filter_lp> sptr;
+ typedef std::shared_ptr<analog_filter_lp> sptr;
analog_filter_lp(filter_type type,
bool bypass,
size_t position_index,
@@ -130,7 +130,7 @@ protected:
std::vector<tap_t> _taps;
public:
- typedef boost::shared_ptr<digital_filter_base> sptr;
+ typedef std::shared_ptr<digital_filter_base> sptr;
digital_filter_base(filter_type type,
bool bypass,
size_t position_index,
@@ -208,7 +208,7 @@ template <typename tap_t>
class UHD_API digital_filter_fir : public digital_filter_base<tap_t>
{
public:
- typedef boost::shared_ptr<digital_filter_fir<tap_t> > sptr;
+ typedef std::shared_ptr<digital_filter_fir<tap_t> > sptr;
digital_filter_fir(filter_info_base::filter_type type,
bool bypass,
diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp
index 82d2f6070..a34baf5eb 100644
--- a/host/include/uhd/types/serial.hpp
+++ b/host/include/uhd/types/serial.hpp
@@ -10,7 +10,7 @@
#include <uhd/config.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include <vector>
@@ -36,7 +36,7 @@ typedef std::vector<uint8_t> byte_vector_t;
class UHD_API i2c_iface
{
public:
- typedef boost::shared_ptr<i2c_iface> sptr;
+ typedef std::shared_ptr<i2c_iface> sptr;
virtual ~i2c_iface(void);
@@ -115,7 +115,7 @@ struct UHD_API spi_config_t
class UHD_API spi_iface
{
public:
- typedef boost::shared_ptr<spi_iface> sptr;
+ typedef std::shared_ptr<spi_iface> sptr;
virtual ~spi_iface(void);
@@ -162,7 +162,7 @@ public:
class UHD_API uart_iface
{
public:
- typedef boost::shared_ptr<uart_iface> sptr;
+ typedef std::shared_ptr<uart_iface> sptr;
virtual ~uart_iface(void);
diff --git a/host/include/uhd/types/wb_iface.hpp b/host/include/uhd/types/wb_iface.hpp
index 495762118..2b7a6d4c5 100644
--- a/host/include/uhd/types/wb_iface.hpp
+++ b/host/include/uhd/types/wb_iface.hpp
@@ -11,14 +11,14 @@
#include <uhd/config.hpp>
#include <uhd/types/time_spec.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace uhd {
class UHD_API wb_iface
{
public:
- typedef boost::shared_ptr<wb_iface> sptr;
+ typedef std::shared_ptr<wb_iface> sptr;
typedef uint32_t wb_addr_type;
virtual ~wb_iface(void);
@@ -69,7 +69,7 @@ public:
class UHD_API timed_wb_iface : public wb_iface
{
public:
- typedef boost::shared_ptr<timed_wb_iface> sptr;
+ typedef std::shared_ptr<timed_wb_iface> sptr;
/*!
* Get the command time.
diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp
index 25f5b816d..9575e6bc9 100644
--- a/host/include/uhd/usrp/dboard_base.hpp
+++ b/host/include/uhd/usrp/dboard_base.hpp
@@ -13,7 +13,7 @@
#include <uhd/usrp/dboard_id.hpp>
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/utils/pimpl.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <uhd/utils/noncopyable.hpp>
namespace uhd { namespace usrp {
@@ -25,7 +25,7 @@ namespace uhd { namespace usrp {
class UHD_API dboard_base : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<dboard_base> sptr;
+ typedef std::shared_ptr<dboard_base> sptr;
/*!
* An opaque type for the dboard constructor args.
* Derived classes should pass the args into the base class,
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp
index 162d0c6a3..9a25fb607 100644
--- a/host/include/uhd/usrp/dboard_iface.hpp
+++ b/host/include/uhd/usrp/dboard_iface.hpp
@@ -15,7 +15,7 @@
#include <uhd/usrp/gpio_defs.hpp>
#include <uhd/utils/pimpl.hpp>
#include <stdint.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/thread/thread.hpp>
#include <string>
#include <vector>
@@ -53,7 +53,7 @@ struct UHD_API dboard_iface_special_props_t
class UHD_API dboard_iface : public uhd::i2c_iface
{
public:
- typedef boost::shared_ptr<dboard_iface> sptr;
+ typedef std::shared_ptr<dboard_iface> sptr;
typedef dboard_iface_special_props_t special_props_t;
//! tells the host which unit to use
diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp
index eb255c346..737c24add 100644
--- a/host/include/uhd/usrp/dboard_manager.hpp
+++ b/host/include/uhd/usrp/dboard_manager.hpp
@@ -12,7 +12,7 @@
#include <uhd/usrp/dboard_base.hpp>
#include <uhd/usrp/dboard_eeprom.hpp>
#include <uhd/usrp/dboard_id.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <uhd/utils/noncopyable.hpp>
#include <string>
#include <vector>
@@ -27,7 +27,7 @@ namespace uhd { namespace usrp {
class UHD_API dboard_manager : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<dboard_manager> sptr;
+ typedef std::shared_ptr<dboard_manager> sptr;
// dboard constructor (each dboard should have a ::make with this signature)
typedef dboard_base::sptr (*dboard_ctor_t)(dboard_base::ctor_args_t);
diff --git a/host/include/uhd/usrp/gps_ctrl.hpp b/host/include/uhd/usrp/gps_ctrl.hpp
index a3485226c..7743894c1 100644
--- a/host/include/uhd/usrp/gps_ctrl.hpp
+++ b/host/include/uhd/usrp/gps_ctrl.hpp
@@ -11,7 +11,7 @@
#include <uhd/types/sensors.hpp>
#include <uhd/types/serial.hpp>
#include <uhd/utils/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <vector>
namespace uhd {
@@ -19,7 +19,7 @@ namespace uhd {
class UHD_API gps_ctrl : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<gps_ctrl> sptr;
+ typedef std::shared_ptr<gps_ctrl> sptr;
virtual ~gps_ctrl(void) = 0;
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 99a966b7a..27b5f3d9a 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -35,7 +35,7 @@
#include <uhd/types/wb_iface.hpp>
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/usrp/subdev_spec.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <uhd/utils/noncopyable.hpp>
#include <complex>
#include <string>
@@ -95,7 +95,7 @@ namespace usrp {
class UHD_API multi_usrp : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<multi_usrp> sptr;
+ typedef std::shared_ptr<multi_usrp> sptr;
virtual ~multi_usrp(void) = 0;
diff --git a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
index 48f8a5eae..6faa10714 100644
--- a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
+++ b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
@@ -45,7 +45,7 @@ namespace uhd { namespace usrp_clock {
class UHD_API multi_usrp_clock : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<multi_usrp_clock> sptr;
+ typedef std::shared_ptr<multi_usrp_clock> sptr;
virtual ~multi_usrp_clock(void) = 0;
diff --git a/host/include/uhd/utils/gain_group.hpp b/host/include/uhd/utils/gain_group.hpp
index 69cd9dc6b..8fe69441f 100644
--- a/host/include/uhd/utils/gain_group.hpp
+++ b/host/include/uhd/utils/gain_group.hpp
@@ -12,7 +12,7 @@
#include <uhd/types/ranges.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include <vector>
@@ -31,7 +31,7 @@ struct UHD_API gain_fcns_t
class UHD_API gain_group : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<gain_group> sptr;
+ typedef std::shared_ptr<gain_group> sptr;
virtual ~gain_group(void) = 0;
diff --git a/host/include/uhd/utils/msg_task.hpp b/host/include/uhd/utils/msg_task.hpp
index 4e73b7720..fd08523f7 100644
--- a/host/include/uhd/utils/msg_task.hpp
+++ b/host/include/uhd/utils/msg_task.hpp
@@ -13,7 +13,7 @@
#include <stdint.h>
#include <boost/function.hpp>
#include <boost/optional/optional.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <uhd/utils/noncopyable.hpp>
#include <vector>
@@ -21,7 +21,7 @@ namespace uhd {
class UHD_API msg_task : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<msg_task> sptr;
+ typedef std::shared_ptr<msg_task> sptr;
typedef std::vector<uint8_t> msg_payload_t;
typedef std::pair<uint32_t, msg_payload_t> msg_type_t;
typedef boost::function<boost::optional<msg_type_t>(void)> task_fcn_type;
diff --git a/host/include/uhd/utils/pimpl.hpp b/host/include/uhd/utils/pimpl.hpp
index a19f4ddc2..b0fbf7fec 100644
--- a/host/include/uhd/utils/pimpl.hpp
+++ b/host/include/uhd/utils/pimpl.hpp
@@ -9,7 +9,7 @@
#define INCLUDED_UHD_UTILS_PIMPL_HPP
#include <uhd/config.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
/*! \file pimpl.hpp
* "Pimpl idiom" (pointer to implementation idiom).
@@ -31,7 +31,7 @@
*/
#define UHD_PIMPL_DECL(_name) \
struct _name; \
- boost::shared_ptr<_name>
+ std::shared_ptr<_name>
/*!
* Make an instance of a pimpl in a source file.
@@ -40,6 +40,6 @@
* \param _name the name of the pimpl class
* \param _args the constructor args for the pimpl
*/
-#define UHD_PIMPL_MAKE(_name, _args) boost::shared_ptr<_name>(new _name _args)
+#define UHD_PIMPL_MAKE(_name, _args) std::shared_ptr<_name>(new _name _args)
#endif /* INCLUDED_UHD_UTILS_PIMPL_HPP */
diff --git a/host/include/uhd/utils/soft_register.hpp b/host/include/uhd/utils/soft_register.hpp
index b6897551f..ba716b206 100644
--- a/host/include/uhd/utils/soft_register.hpp
+++ b/host/include/uhd/utils/soft_register.hpp
@@ -138,7 +138,7 @@ template <typename reg_data_t, bool readable, bool writable>
class UHD_API soft_register_t : public soft_register_base
{
public:
- typedef boost::shared_ptr<soft_register_t<reg_data_t, readable, writable> > sptr;
+ typedef std::shared_ptr<soft_register_t<reg_data_t, readable, writable> > sptr;
// Reserved field. Represents all bits in the register.
UHD_DEFINE_SOFT_REG_FIELD(REGISTER, sizeof(reg_data_t) * 8, 0); //[WIDTH-1:0]
@@ -312,7 +312,7 @@ class UHD_API soft_register_sync_t
: public soft_register_t<reg_data_t, readable, writable>
{
public:
- typedef boost::shared_ptr<soft_register_sync_t<reg_data_t, readable, writable> > sptr;
+ typedef std::shared_ptr<soft_register_sync_t<reg_data_t, readable, writable> > sptr;
soft_register_sync_t(wb_iface::wb_addr_type wr_addr,
wb_iface::wb_addr_type rd_addr,
@@ -428,7 +428,7 @@ typedef soft_register_sync_t<uint64_t, true, true> soft_reg64_rw_sync_t;
reg_obj.initialize(iface);
reg_obj.write(example_reg_t::FIELD2, 0x1234);
- example_reg_t::sptr reg_sptr = boost::make_shared<example_reg_t>();
+ example_reg_t::sptr reg_sptr = std::make_shared<example_reg_t>();
reg_obj->initialize(iface);
reg_obj->write(example_reg_t::FIELD2, 0x1234);
}
@@ -444,7 +444,7 @@ namespace uhd {
class UHD_API soft_regmap_accessor_t
{
public:
- typedef boost::shared_ptr<soft_regmap_accessor_t> sptr;
+ typedef std::shared_ptr<soft_regmap_accessor_t> sptr;
virtual ~soft_regmap_accessor_t(){};
virtual soft_register_base& lookup(const std::string& path) const = 0;
@@ -587,7 +587,7 @@ private:
class UHD_API soft_regmap_db_t : public soft_regmap_accessor_t, public uhd::noncopyable
{
public:
- typedef boost::shared_ptr<soft_regmap_db_t> sptr;
+ typedef std::shared_ptr<soft_regmap_db_t> sptr;
/*!
* Use the default constructor if this is the top-level DB
diff --git a/host/include/uhd/utils/tasks.hpp b/host/include/uhd/utils/tasks.hpp
index fdb3869ee..eaee3edbe 100644
--- a/host/include/uhd/utils/tasks.hpp
+++ b/host/include/uhd/utils/tasks.hpp
@@ -1,7 +1,8 @@
//
// Copyright 2011-2012 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
// Copyright 2017 Ettus Research (National Instruments Corp.)
+// Copyright 2018 Ettus Research, a National Instruments Company
+// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
@@ -12,15 +13,15 @@
#include <uhd/config.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
+#include <memory>
+#include <string>
namespace uhd {
class UHD_API task : uhd::noncopyable
{
public:
- typedef boost::shared_ptr<task> sptr;
+ typedef std::shared_ptr<task> sptr;
typedef boost::function<void(void)> task_fcn_type;
/*!
diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp b/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp
index 4e00453c8..c407a0967 100644
--- a/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp
+++ b/host/lib/deps/rpclib/include/rpc/msgpack/unpack.hpp
@@ -1050,8 +1050,8 @@ public:
// std::auto_ptr<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>
diff --git a/host/python/pyuhd.cpp b/host/python/pyuhd.cpp
index b29ca4678..e38dc9224 100644
--- a/host/python/pyuhd.cpp
+++ b/host/python/pyuhd.cpp
@@ -13,11 +13,6 @@
namespace py = pybind11;
-// Allow boost::shared_ptr<T> to be a holder class of an object (PyBind11
-// supports std::shared_ptr and std::unique_ptr out of the box)
-#include <boost/shared_ptr.hpp>
-PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr<T>);
-
#include "stream_python.hpp"
#include "types/types_python.hpp"
diff --git a/host/tests/common/mock_zero_copy.cpp b/host/tests/common/mock_zero_copy.cpp
index 0843a0274..8b9e04f64 100644
--- a/host/tests/common/mock_zero_copy.cpp
+++ b/host/tests/common/mock_zero_copy.cpp
@@ -6,7 +6,7 @@
#include "mock_zero_copy.hpp"
-#include <boost/shared_ptr.hpp>
+#include <memory>
using namespace uhd::transport;
diff --git a/host/tests/common/mock_zero_copy.hpp b/host/tests/common/mock_zero_copy.hpp
index 515fde498..16a64f5a1 100644
--- a/host/tests/common/mock_zero_copy.hpp
+++ b/host/tests/common/mock_zero_copy.hpp
@@ -13,9 +13,9 @@
#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/endianness.hpp>
#include <uhd/utils/byteswap.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/shared_array.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <list>
#include <vector>
@@ -71,7 +71,7 @@ private:
class mock_zero_copy : public uhd::transport::zero_copy_if
{
public:
- typedef boost::shared_ptr<mock_zero_copy> sptr;
+ typedef std::shared_ptr<mock_zero_copy> sptr;
mock_zero_copy(uhd::transport::vrt::if_packet_info_t::link_type_t type,
size_t recv_frame_size = DEFAULT_RECV_FRAME_SIZE,
diff --git a/host/tests/expert_test.cpp b/host/tests/expert_test.cpp
index 36a9ef03b..99e3c1100 100644
--- a/host/tests/expert_test.cpp
+++ b/host/tests/expert_test.cpp
@@ -9,7 +9,7 @@
#include <uhdlib/experts/expert_container.hpp>
#include <uhdlib/experts/expert_factory.hpp>
#include <boost/format.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/test/unit_test.hpp>
#include <fstream>
@@ -112,7 +112,7 @@ private:
class worker5_t : public worker_node_t
{
public:
- worker5_t(const node_retriever_t& db, boost::shared_ptr<int> output)
+ worker5_t(const node_retriever_t& db, std::shared_ptr<int> output)
: worker_node_t("Consume_G"), _g(db, "G"), _c(db, "C"), _output(output)
{
bind_accessor(_g);
@@ -128,7 +128,7 @@ private:
data_reader_t<int> _g;
data_writer_t<int> _c;
- boost::shared_ptr<int> _output;
+ std::shared_ptr<int> _output;
};
class worker6_t : public worker_node_t
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(test_experts)
uhd::property_tree::sptr tree = uhd::property_tree::make();
// Output of expert tree
- boost::shared_ptr<int> final_output = boost::make_shared<int>();
+ std::shared_ptr<int> final_output = std::make_shared<int>();
// Add data nodes to container
expert_factory::add_dual_prop_node<int>(
diff --git a/host/tests/packet_handler_benchmark.cpp b/host/tests/packet_handler_benchmark.cpp
index d0a28bdc2..bf21b0c2b 100644
--- a/host/tests/packet_handler_benchmark.cpp
+++ b/host/tests/packet_handler_benchmark.cpp
@@ -56,7 +56,7 @@ struct rx_fc_cache_t
};
inline bool rx_flow_ctrl(
- boost::shared_ptr<rx_fc_cache_t> fc_cache, uhd::transport::managed_buffer::sptr buff)
+ std::shared_ptr<rx_fc_cache_t> fc_cache, uhd::transport::managed_buffer::sptr buff)
{
// If the caller supplied a buffer
if (buff) {
@@ -92,7 +92,7 @@ inline bool rx_flow_ctrl(
}
inline void handle_rx_flowctrl_ack(
- boost::shared_ptr<rx_fc_cache_t> /*fc_cache*/, const uint32_t* /*payload*/)
+ std::shared_ptr<rx_fc_cache_t> /*fc_cache*/, const uint32_t* /*payload*/)
{
// For the benchmark, we should never reach this
UHD_THROW_INVALID_CODE_PATH();
@@ -119,7 +119,7 @@ struct tx_fc_cache_t
pack;
};
-inline bool tx_flow_ctrl(boost::shared_ptr<tx_fc_cache_t> fc_cache,
+inline bool tx_flow_ctrl(std::shared_ptr<tx_fc_cache_t> fc_cache,
uhd::transport::zero_copy_if::sptr /*xport*/,
uhd::transport::managed_buffer::sptr buff)
{
@@ -151,7 +151,7 @@ inline bool tx_flow_ctrl(boost::shared_ptr<tx_fc_cache_t> fc_cache,
return false;
}
-inline void tx_flow_ctrl_ack(boost::shared_ptr<tx_fc_cache_t> fc_cache,
+inline void tx_flow_ctrl_ack(std::shared_ptr<tx_fc_cache_t> fc_cache,
uhd::transport::zero_copy_if::sptr /*send_xport*/)
{
if (not fc_cache->fc_received) {
@@ -187,7 +187,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format)
xport->set_reuse_recv_memory(true);
// Configure xport flow control
- boost::shared_ptr<rx_fc_cache_t> fc_cache(new rx_fc_cache_t());
+ std::shared_ptr<rx_fc_cache_t> fc_cache(new rx_fc_cache_t());
fc_cache->to_host = uhd::ntohx<uint32_t>;
fc_cache->from_host = uhd::htonx<uint32_t>;
fc_cache->pack = vrt::chdr::if_hdr_pack_be;
@@ -201,7 +201,7 @@ void benchmark_recv_packet_handler(const size_t spp, const std::string& format)
});
// Create streamer
- auto streamer = boost::make_shared<sph::recv_packet_streamer>(spp);
+ auto streamer = std::make_shared<sph::recv_packet_streamer>(spp);
streamer->set_tick_rate(1.0);
streamer->set_samp_rate(1.0);
@@ -260,7 +260,7 @@ void benchmark_send_packet_handler(
xport->set_reuse_send_memory(true);
// Configure flow control
- boost::shared_ptr<tx_fc_cache_t> fc_cache(new tx_fc_cache_t());
+ std::shared_ptr<tx_fc_cache_t> fc_cache(new tx_fc_cache_t());
fc_cache->to_host = uhd::ntohx<uint32_t>;
fc_cache->from_host = uhd::htonx<uint32_t>;
fc_cache->pack = vrt::chdr::if_hdr_pack_be;
@@ -274,7 +274,7 @@ void benchmark_send_packet_handler(
0);
// Create streamer
- auto streamer = boost::make_shared<sph::send_packet_streamer>(spp);
+ auto streamer = std::make_shared<sph::send_packet_streamer>(spp);
streamer->set_vrt_packer(&vrt::chdr::if_hdr_pack_be);
// Configure converter
diff --git a/host/tests/rx_streamer_test.cpp b/host/tests/rx_streamer_test.cpp
index cd4daf569..1b1311908 100644
--- a/host/tests/rx_streamer_test.cpp
+++ b/host/tests/rx_streamer_test.cpp
@@ -6,7 +6,7 @@
#include "../common/mock_link.hpp"
#include <uhdlib/transport/rx_streamer_impl.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/test/unit_test.hpp>
#include <iostream>
@@ -148,13 +148,13 @@ static std::vector<mock_recv_link::sptr> make_links(const size_t num)
return links;
}
-static boost::shared_ptr<mock_rx_streamer> make_rx_streamer(
+static std::shared_ptr<mock_rx_streamer> make_rx_streamer(
std::vector<mock_recv_link::sptr> recv_links,
const std::string& host_format,
const std::string& otw_format = "sc16")
{
const uhd::stream_args_t stream_args(host_format, otw_format);
- auto streamer = boost::make_shared<mock_rx_streamer>(recv_links.size(), stream_args);
+ auto streamer = std::make_shared<mock_rx_streamer>(recv_links.size(), stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp
index 3c185d21a..5685028d6 100644
--- a/host/tests/sph_recv_test.cpp
+++ b/host/tests/sph_recv_test.cpp
@@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_normal)
std::vector<mock_zero_copy::sptr> xports;
for (size_t i = 0; i < NCHANNELS; i++) {
xports.push_back(
- boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
+ std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
}
// generate a bunch of packets
@@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_sequence_error)
std::vector<mock_zero_copy::sptr> xports;
for (size_t i = 0; i < NCHANNELS; i++) {
xports.push_back(
- boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
+ std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
}
// generate a bunch of packets
@@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_time_error)
std::vector<mock_zero_copy::sptr> xports;
for (size_t i = 0; i < NCHANNELS; i++) {
xports.push_back(
- boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
+ std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
}
// generate a bunch of packets
@@ -642,7 +642,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_exception)
std::vector<mock_zero_copy::sptr> xports;
for (size_t i = 0; i < NCHANNELS; i++) {
xports.push_back(
- boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
+ std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
}
// generate a bunch of packets
@@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment)
std::vector<mock_zero_copy::sptr> xports;
for (size_t i = 0; i < NCHANNELS; i++) {
xports.push_back(
- boost::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
+ std::make_shared<mock_zero_copy>(vrt::if_packet_info_t::LINK_TYPE_VRLP));
}
// generate a bunch of packets
diff --git a/host/tests/streamer_benchmark.cpp b/host/tests/streamer_benchmark.cpp
index 46ba6add0..02aa102a0 100644
--- a/host/tests/streamer_benchmark.cpp
+++ b/host/tests/streamer_benchmark.cpp
@@ -12,7 +12,7 @@
#include <uhdlib/transport/inline_io_service.hpp>
#include <uhdlib/transport/rx_streamer_impl.hpp>
#include <uhdlib/transport/tx_streamer_impl.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/program_options.hpp>
#include <chrono>
#include <iostream>
@@ -219,11 +219,11 @@ using tx_streamer_mock_link = mock_tx_streamer<chdr_tx_data_xport>;
/*!
* Helper functions
*/
-static boost::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport(
+static std::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport(
const size_t spp, const std::string& format)
{
const uhd::stream_args_t stream_args(format, "sc16");
- auto streamer = boost::make_shared<rx_streamer_mock_xport>(1, stream_args);
+ auto streamer = std::make_shared<rx_streamer_mock_xport>(1, stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
streamer->set_scale_factor(0, SCALE_FACTOR);
@@ -238,11 +238,11 @@ static boost::shared_ptr<rx_streamer_mock_xport> make_rx_streamer_mock_xport(
return streamer;
}
-static boost::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport(
+static std::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport(
const size_t spp, const std::string& format)
{
const uhd::stream_args_t stream_args(format, "sc16");
- auto streamer = boost::make_shared<tx_streamer_mock_xport>(1, stream_args);
+ auto streamer = std::make_shared<tx_streamer_mock_xport>(1, stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
streamer->set_scale_factor(0, SCALE_FACTOR);
@@ -257,11 +257,11 @@ static boost::shared_ptr<tx_streamer_mock_xport> make_tx_streamer_mock_xport(
return streamer;
}
-static boost::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link(
+static std::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link(
const size_t spp, const std::string& format)
{
const uhd::stream_args_t stream_args(format, "sc16");
- auto streamer = boost::make_shared<rx_streamer_mock_link>(1, stream_args);
+ auto streamer = std::make_shared<rx_streamer_mock_link>(1, stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
streamer->set_scale_factor(0, SCALE_FACTOR);
@@ -307,11 +307,11 @@ static boost::shared_ptr<rx_streamer_mock_link> make_rx_streamer_mock_link(
return streamer;
}
-static boost::shared_ptr<tx_streamer_mock_link> make_tx_streamer_mock_link(
+static std::shared_ptr<tx_streamer_mock_link> make_tx_streamer_mock_link(
const size_t spp, const std::string& format)
{
const uhd::stream_args_t stream_args(format, "sc16");
- auto streamer = boost::make_shared<tx_streamer_mock_link>(1, stream_args);
+ auto streamer = std::make_shared<tx_streamer_mock_link>(1, stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
streamer->set_scale_factor(0, SCALE_FACTOR);
diff --git a/host/tests/tx_streamer_test.cpp b/host/tests/tx_streamer_test.cpp
index 686c1b761..09c8357df 100644
--- a/host/tests/tx_streamer_test.cpp
+++ b/host/tests/tx_streamer_test.cpp
@@ -6,7 +6,7 @@
#include "../common/mock_link.hpp"
#include <uhdlib/transport/tx_streamer_impl.hpp>
-#include <boost/make_shared.hpp>
+#include <memory>
#include <boost/test/unit_test.hpp>
#include <iostream>
@@ -121,11 +121,11 @@ static std::vector<mock_send_link::sptr> make_links(const size_t num)
return links;
}
-static boost::shared_ptr<mock_tx_streamer> make_tx_streamer(
+static std::shared_ptr<mock_tx_streamer> make_tx_streamer(
std::vector<mock_send_link::sptr> send_links, const std::string& format)
{
const uhd::stream_args_t stream_args(format, "sc16");
- auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
+ auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
streamer->set_tick_rate(TICK_RATE);
streamer->set_samp_rate(SAMP_RATE);
@@ -379,7 +379,7 @@ BOOST_AUTO_TEST_CASE(test_spp)
auto send_links = make_links(1);
uhd::stream_args_t stream_args("fc64", "sc16");
stream_args.args["spp"] = std::to_string(10);
- auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
+ auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
mock_tx_data_xport::uptr xport(std::make_unique<mock_tx_data_xport>(send_links[0]));
streamer->connect_channel(0, std::move(xport));
BOOST_CHECK_EQUAL(streamer->get_max_num_samps(), 10);
@@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE(test_spp)
auto send_links = make_links(1);
uhd::stream_args_t stream_args("fc64", "sc16");
stream_args.args["spp"] = std::to_string(10000);
- auto streamer = boost::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
+ auto streamer = std::make_shared<mock_tx_streamer>(send_links.size(), stream_args);
mock_tx_data_xport::uptr xport(std::make_unique<mock_tx_data_xport>(send_links[0]));
const size_t max_pyld = xport->get_max_payload_size();
streamer->connect_channel(0, std::move(xport));
diff --git a/host/utils/latency/responder.cpp b/host/utils/latency/responder.cpp
index fd47ad085..9b27fdcb8 100644
--- a/host/utils/latency/responder.cpp
+++ b/host/utils/latency/responder.cpp
@@ -117,6 +117,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
}
// create a new instance of Responder and run it!
- boost::shared_ptr<Responder> my_responder(new Responder(prog));
+ std::shared_ptr<Responder> my_responder(new Responder(prog));
return my_responder->run();
}