Package: gnuradio / 3.7.10.1-2

0005-move-fec-polar-decoder-D_LLR_FACTOR-into-cpp.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From a981e6a18c4f28cc6058fef4167c01ad3dc7d58a Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Sat, 6 Aug 2016 21:38:52 -0700
Subject: [PATCH 5/6] move fec polar decoder D_LLR_FACTOR into cpp

Class constants need to be defined in the C++ source or linker issues occur.
---
 gr-fec/include/gnuradio/fec/polar_decoder_common.h | 2 +-
 gr-fec/lib/polar_decoder_common.cc                 | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_common.h b/gr-fec/include/gnuradio/fec/polar_decoder_common.h
index a39ee4f..13b25ea 100644
--- a/gr-fec/include/gnuradio/fec/polar_decoder_common.h
+++ b/gr-fec/include/gnuradio/fec/polar_decoder_common.h
@@ -68,7 +68,7 @@ namespace gr {
         bool set_frame_size(unsigned int frame_size){return false;};
 
       private:
-        static BOOST_CONSTEXPR_OR_CONST float D_LLR_FACTOR = -2.19722458f;
+        static BOOST_CONSTEXPR_OR_CONST float D_LLR_FACTOR;
         unsigned int d_frozen_bit_counter;
 
       protected:
diff --git a/gr-fec/lib/polar_decoder_common.cc b/gr-fec/lib/polar_decoder_common.cc
index 8fc2e37..1d4a21a 100644
--- a/gr-fec/lib/polar_decoder_common.cc
+++ b/gr-fec/lib/polar_decoder_common.cc
@@ -34,6 +34,8 @@ namespace gr {
   namespace fec {
     namespace code {
 
+      const float polar_decoder_common::D_LLR_FACTOR = -2.19722458f;
+
       polar_decoder_common::polar_decoder_common(int block_size, int num_info_bits,
                                                  std::vector<int> frozen_bit_positions,
                                                  std::vector<char> frozen_bit_values) :
-- 
2.1.4