From db9285586213f0100dd9f0caf6e69e872d9a6718 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Wed, 10 Jul 2019 15:00:18 -0700 Subject: device3: rfnoc: formatting changes Applying clang-format to files used in upcoming changes. clang-format -i --style=file host/include/uhd/rfnoc/node_ctrl_base.hpp clang-format -i --style=file host/lib/rfnoc/ddc_block_ctrl_impl.cpp \ host/lib/rfnoc/duc_block_ctrl_impl.cpp \ host/lib/rfnoc/legacy_compat.cpp \ host/lib/usrp/device3/device3_impl.cpp \ host/lib/usrp/device3/device3_impl.hpp \ host/lib/usrp/device3/device3_io_impl.cpp \ host/lib/usrp/x300/x300_impl.cpp --- host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 12 ++++++------ host/lib/rfnoc/duc_block_ctrl_impl.cpp | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp index dbba7f68c..7785d525d 100644 --- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp @@ -170,9 +170,8 @@ public: or stream_cmd.stream_mode == uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_MORE) { const size_t decimation = - static_cast( - get_arg("input_rate", chan) - / get_arg("output_rate", chan)); + static_cast(get_arg("input_rate", chan) + / get_arg("output_rate", chan)); stream_cmd.num_samps *= decimation; } @@ -228,9 +227,10 @@ private: double set_output_rate(const double requested_rate, const size_t chan) { const double input_rate = get_arg("input_rate"); - const double tick_rate = _tree->exists("tick_rate") ? - _tree->access("tick_rate").get() : input_rate; - const size_t m = size_t(tick_rate / input_rate); + const double tick_rate = _tree->exists("tick_rate") + ? _tree->access("tick_rate").get() + : input_rate; + const size_t m = size_t(tick_rate / input_rate); const size_t decim_rate = boost::math::iround( input_rate / this->get_output_rates().clip(requested_rate, true)); size_t decim = decim_rate; diff --git a/host/lib/rfnoc/duc_block_ctrl_impl.cpp b/host/lib/rfnoc/duc_block_ctrl_impl.cpp index 8d5567d21..0a24fcc31 100644 --- a/host/lib/rfnoc/duc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/duc_block_ctrl_impl.cpp @@ -213,9 +213,10 @@ private: double set_input_rate(const double requested_rate, const size_t chan) { const double output_rate = get_arg("output_rate", chan); - const double tick_rate = _tree->exists("tick_rate") ? - _tree->access("tick_rate").get() : output_rate; - const size_t n = size_t(tick_rate / output_rate); + const double tick_rate = _tree->exists("tick_rate") + ? _tree->access("tick_rate").get() + : output_rate; + const size_t n = size_t(tick_rate / output_rate); const size_t interp_rate = boost::math::iround( output_rate / get_input_rates().clip(requested_rate, true)); size_t interp = interp_rate; -- cgit v1.2.3