diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-07-10 15:00:18 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-07-15 10:12:33 -0700 |
commit | db9285586213f0100dd9f0caf6e69e872d9a6718 (patch) | |
tree | 05a43f722c8a0108a49cb75ef0f2689bf79c5b63 /host/lib/rfnoc | |
parent | cad30dfe1577f12452e66a017b3a53e0af8d4dd2 (diff) | |
download | uhd-db9285586213f0100dd9f0caf6e69e872d9a6718.tar.gz uhd-db9285586213f0100dd9f0caf6e69e872d9a6718.tar.bz2 uhd-db9285586213f0100dd9f0caf6e69e872d9a6718.zip |
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
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 12 | ||||
-rw-r--r-- | host/lib/rfnoc/duc_block_ctrl_impl.cpp | 7 |
2 files changed, 10 insertions, 9 deletions
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<size_t>( - get_arg<double>("input_rate", chan) - / get_arg<double>("output_rate", chan)); + static_cast<size_t>(get_arg<double>("input_rate", chan) + / get_arg<double>("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<double>("input_rate"); - const double tick_rate = _tree->exists("tick_rate") ? - _tree->access<double>("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<double>("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<double>("output_rate", chan); - const double tick_rate = _tree->exists("tick_rate") ? - _tree->access<double>("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<double>("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; |