diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-15 14:42:05 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-18 09:37:12 -0800 |
commit | 11c7e561fc29b56ade8ae6ec549b21c533540e8a (patch) | |
tree | a346b7bd7e561efbb8d61de59c4ac2dec4c18d0b /host/lib/usrp/common/ad936x_manager.cpp | |
parent | eb1f8f160b803bae60c2af7be35e42ece3b8a62b (diff) | |
download | uhd-11c7e561fc29b56ade8ae6ec549b21c533540e8a.tar.gz uhd-11c7e561fc29b56ade8ae6ec549b21c533540e8a.tar.bz2 uhd-11c7e561fc29b56ade8ae6ec549b21c533540e8a.zip |
math: Remove uhd::math::log2, replace with std::log2
Now that we're C++11, we can assume the existence of said symbol and
need no more portability hacks.
Diffstat (limited to 'host/lib/usrp/common/ad936x_manager.cpp')
-rw-r--r-- | host/lib/usrp/common/ad936x_manager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp index 87521e834..5c4cb51ae 100644 --- a/host/lib/usrp/common/ad936x_manager.cpp +++ b/host/lib/usrp/common/ad936x_manager.cpp @@ -10,6 +10,7 @@ #include <boost/functional/hash.hpp> #include <boost/make_shared.hpp> #include <chrono> +#include <cmath> #include <thread> using namespace uhd; @@ -167,7 +168,7 @@ public: // We use shifts here instead of 2^x because exp2() is not available in all // compilers, also this guarantees no rounding issues. The type cast to int32_t // serves as floor(): - int32_t multiplier = (1 << int32_t(uhd::math::log2(max_tick_rate / lcm_rate))); + int32_t multiplier = (1 << int32_t(std::log2(max_tick_rate / lcm_rate))); if (multiplier == 2 and lcm_rate >= min_tick_rate) { // Don't bother (see above) multiplier = 1; |