summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorJosh Blum2011-10-08 13:43:32 -0700
committerJosh Blum2011-10-08 13:43:32 -0700
commit63b87bf4e6e9a2f1112c17c57796b69b3b8a2b3e (patch)
tree9ee830618e5d8253af8e8cec72dcec8925092dda /gnuradio-core/src/lib
parent369834c83e26ac090dbac48c8c8e885ba210665a (diff)
downloadgnuradio-63b87bf4e6e9a2f1112c17c57796b69b3b8a2b3e.tar.gz
gnuradio-63b87bf4e6e9a2f1112c17c57796b69b3b8a2b3e.tar.bz2
gnuradio-63b87bf4e6e9a2f1112c17c57796b69b3b8a2b3e.zip
gr: minor tweaks for MSVC compatibility
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/general/gr_cpm.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_cpm.cc b/gnuradio-core/src/lib/general/gr_cpm.cc
index a00526b52..94a428c58 100644
--- a/gnuradio-core/src/lib/general/gr_cpm.cc
+++ b/gnuradio-core/src/lib/general/gr_cpm.cc
@@ -28,6 +28,10 @@
#include <cfloat>
#include <gr_cpm.h>
+//gives us erf on compilers without it
+#include <boost/math/special_functions/erf.hpp>
+namespace bm = boost::math;
+
#ifndef M_TWOPI
# define M_TWOPI (2*M_PI)
#endif
@@ -178,8 +182,8 @@ generate_cpm_gaussian_taps(unsigned samples_per_sym, unsigned L, double bt)
double alpha = 5.336446256636997 * bt;
for (unsigned i = 0; i < samples_per_sym * L; i++) {
double k = i - Ls/2; // Causal to acausal
- taps_d[i] = (erf(alpha * (k / samples_per_sym + 0.5)) -
- erf(alpha * (k / samples_per_sym - 0.5)))
+ taps_d[i] = (bm::erf(alpha * (k / samples_per_sym + 0.5)) -
+ bm::erf(alpha * (k / samples_per_sym - 0.5)))
* 0.5 / samples_per_sym;
taps[i] = (float) taps_d[i];
}