aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-06-19 00:06:52 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-06-24 12:00:49 -0500
commit188fbb17cfd18c87f60ec56f62476f97ef2779bb (patch)
treee88b9fb8436aa42f3ecbdc0403751a3e68bbbac8 /host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
parent78ec29b6becd53f79a0ae282ae22c38bedb887d1 (diff)
downloaduhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.gz
uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.bz2
uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.zip
uhd: Remove all occurences of boost::math::*round()
Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy.
Diffstat (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.cpp')
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
index 9e088871d..9275c83f5 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
@@ -5,17 +5,16 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
+#define _USE_MATH_DEFINES
#include "ad9361_device.h"
#include "ad9361_client.h"
#include "ad9361_filter_taps.h"
#include "ad9361_gain_tables.h"
#include "ad9361_synth_lut.h"
-#define _USE_MATH_DEFINES
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
#include <stdint.h>
#include <boost/format.hpp>
-#include <boost/math/special_functions.hpp>
#include <boost/scoped_array.hpp>
#include <chrono>
#include <cmath>
@@ -1237,7 +1236,7 @@ double ad9361_device_t::_tune_bbvco(const double rate)
int nint = static_cast<int>(vcorate / fref);
UHD_LOG_TRACE("AD936X", "[ad9361_device_t::_tune_bbvco] (nint)=" << (vcorate / fref));
int nfrac = static_cast<int>(
- boost::math::round(((vcorate / fref) - (double)nint) * (double)modulus));
+ std::lround(((vcorate / fref) - (double)nint) * (double)modulus));
UHD_LOG_TRACE("AD936X",
"[ad9361_device_t::_tune_bbvco] (nfrac)=" << ((vcorate / fref) - (double)nint)
* (double)modulus);