diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-17 17:16:54 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-17 17:16:54 +0000 |
commit | 1aa1404ebb59594a8c81b31f9b56ad35bd832a26 (patch) | |
tree | 5de014f592095c659e0e90f2264925210817df6c /host/lib/usrp/usrp2/dsp_impl.cpp | |
parent | 1b47702245f0c1f4dda3e0eff487bbe664d48855 (diff) | |
parent | 7d110e73e6b0651f73e8e5b165244f59e66fed87 (diff) | |
download | uhd-1aa1404ebb59594a8c81b31f9b56ad35bd832a26.tar.gz uhd-1aa1404ebb59594a8c81b31f9b56ad35bd832a26.tar.bz2 uhd-1aa1404ebb59594a8c81b31f9b56ad35bd832a26.zip |
Merge branch 'next' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e_merge
Diffstat (limited to 'host/lib/usrp/usrp2/dsp_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/dsp_impl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 7d9cdc441..347ec38af 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -17,9 +17,10 @@ #include "usrp2_impl.hpp" #include "usrp2_regs.hpp" -#include "../dsp_utils.hpp" +#include <uhd/usrp/dsp_utils.hpp> #include <uhd/usrp/dsp_props.hpp> #include <boost/bind.hpp> +#include <cmath> using namespace uhd; using namespace uhd::usrp; @@ -30,10 +31,9 @@ static const size_t default_interp = 16; /*********************************************************************** * DDC Helper Methods **********************************************************************/ -template <class rate_t> static rate_t -pick_closest_rate(double exact_rate, const std::vector<rate_t> &rates){ - rate_t closest_match = rates.at(0); - BOOST_FOREACH(rate_t possible_rate, rates){ +static unsigned pick_closest_rate(double exact_rate, const std::vector<unsigned> &rates){ + unsigned closest_match = rates.front(); + BOOST_FOREACH(unsigned possible_rate, rates){ if(std::abs(exact_rate - possible_rate) < std::abs(exact_rate - closest_match)) closest_match = possible_rate; } |