summaryrefslogtreecommitdiff
path: root/gr-fec
diff options
context:
space:
mode:
authorJosh Morman <mormjb@gmail.com>2020-04-23 08:48:02 -0400
committerJosh Morman <mormjb@gmail.com>2020-06-04 10:05:47 -0400
commita49a9cced34393f3f755f58797c970c171087fa5 (patch)
tree809ec2cfd6a543ab9c34d00c3c16465e3e7f4701 /gr-fec
parentc36b6a955cee3ffba49f39d65fd25f3ffc8b57a1 (diff)
fec: replace char with uint8_t
pybind gets confused with char arguments and tries to interpret them as strings. uint8_t is more consistent across the gr codebase as well
Diffstat (limited to 'gr-fec')
-rw-r--r--gr-fec/include/gnuradio/fec/alist.h2
-rw-r--r--gr-fec/include/gnuradio/fec/awgn_bp.h12
-rw-r--r--gr-fec/include/gnuradio/fec/cldpc.h8
-rw-r--r--gr-fec/include/gnuradio/fec/depuncture_bb.h2
-rw-r--r--gr-fec/include/gnuradio/fec/gf2mat.h6
-rw-r--r--gr-fec/include/gnuradio/fec/gf2vec.h11
-rw-r--r--gr-fec/include/gnuradio/fec/polar_common.h5
-rw-r--r--gr-fec/include/gnuradio/fec/polar_decoder_common.h2
-rw-r--r--gr-fec/include/gnuradio/fec/polar_decoder_sc.h4
-rw-r--r--gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h4
-rw-r--r--gr-fec/include/gnuradio/fec/polar_encoder.h4
-rw-r--r--gr-fec/lib/alist.cc4
-rw-r--r--gr-fec/lib/awgn_bp.cc18
-rw-r--r--gr-fec/lib/cldpc.cc16
-rw-r--r--gr-fec/lib/depuncture_bb_impl.cc4
-rw-r--r--gr-fec/lib/depuncture_bb_impl.h2
-rw-r--r--gr-fec/lib/gf2mat.cc4
-rw-r--r--gr-fec/lib/gf2vec.cc8
-rw-r--r--gr-fec/lib/ldpc_decoder.cc4
-rw-r--r--gr-fec/lib/ldpc_encoder_impl.cc4
-rw-r--r--gr-fec/lib/polar_common.cc2
-rw-r--r--gr-fec/lib/polar_decoder_common.cc2
-rw-r--r--gr-fec/lib/polar_decoder_sc.cc4
-rw-r--r--gr-fec/lib/polar_decoder_sc_list.cc4
-rw-r--r--gr-fec/lib/polar_decoder_sc_systematic.cc2
-rw-r--r--gr-fec/lib/polar_encoder.cc4
-rw-r--r--gr-fec/lib/polar_encoder_systematic.cc2
27 files changed, 73 insertions, 71 deletions
diff --git a/gr-fec/include/gnuradio/fec/alist.h b/gr-fec/include/gnuradio/fec/alist.h
index 71dc50ebe4..381c82b0af 100644
--- a/gr-fec/include/gnuradio/fec/alist.h
+++ b/gr-fec/include/gnuradio/fec/alist.h
@@ -75,7 +75,7 @@ public:
void print_mlist_i(int i);
//! Returns the corresponding H matrix
- std::vector<std::vector<char>> get_matrix();
+ std::vector<std::vector<uint8_t>> get_matrix();
protected:
//! A variable indicating if data has been read from alist-file
diff --git a/gr-fec/include/gnuradio/fec/awgn_bp.h b/gr-fec/include/gnuradio/fec/awgn_bp.h
index e24a55879c..078baa700b 100644
--- a/gr-fec/include/gnuradio/fec/awgn_bp.h
+++ b/gr-fec/include/gnuradio/fec/awgn_bp.h
@@ -74,7 +74,7 @@ public:
void update_vars();
//! Returns the current estimate
- std::vector<char> get_estimate();
+ std::vector<uint8_t> get_estimate();
//! Computes initial estimate based on the vector rx_word
void compute_init_estimate(std::vector<float> rx_word);
@@ -83,16 +83,16 @@ public:
void decision();
//! Returns the syndrome for the current estimate
- std::vector<char> get_syndrome();
+ std::vector<uint8_t> get_syndrome();
//! Returns the syndrome for the input codeword
- std::vector<char> get_syndrome(const std::vector<char> codeword);
+ std::vector<uint8_t> get_syndrome(const std::vector<uint8_t> codeword);
//! Checks if the current estimate is a codeword
bool is_codeword();
//! Checks if the input is a codeword
- bool is_codeword(const std::vector<char> codeword);
+ bool is_codeword(const std::vector<uint8_t> codeword);
//! Sets the variable K
void set_K(int k);
@@ -113,7 +113,7 @@ public:
* \param niterations The number of message passing iterations
* done to decode this codeword.
*/
- std::vector<char> decode(std::vector<float> rx_word, int* niterations);
+ std::vector<uint8_t> decode(std::vector<float> rx_word, int* niterations);
private:
//! The number of check nodes in the tanner-graph
@@ -159,6 +159,6 @@ private:
std::vector<int> num_mlist;
//! The array for holding estimate computed on BP decoding
- std::vector<char> estimate;
+ std::vector<uint8_t> estimate;
};
#endif // ifndef AWGN_BP_H
diff --git a/gr-fec/include/gnuradio/fec/cldpc.h b/gr-fec/include/gnuradio/fec/cldpc.h
index 76d4bc325e..30cc7fbbda 100644
--- a/gr-fec/include/gnuradio/fec/cldpc.h
+++ b/gr-fec/include/gnuradio/fec/cldpc.h
@@ -48,7 +48,7 @@ public:
section A.1 of the reference given below.
- "Modern Coding Theory", T Richardson and R Urbanke.
*/
- std::vector<char> encode(std::vector<char> dataword);
+ std::vector<uint8_t> encode(std::vector<uint8_t> dataword);
//! Returns the dimension of the code
int dimension();
@@ -66,16 +66,16 @@ public:
int get_N();
//! Returns the syndrome for a given vector "in"
- std::vector<char> syndrome(const std::vector<char> in);
+ std::vector<uint8_t> syndrome(const std::vector<uint8_t> in);
//! Returns true if "in" is a codeword, else false
- bool is_codeword(const std::vector<char> in);
+ bool is_codeword(const std::vector<uint8_t> in);
//! Set the variable _list
void set_alist(const alist _list);
//! Obtain systematic bits from "in"
- std::vector<char> get_systematic_bits(std::vector<char> in);
+ std::vector<uint8_t> get_systematic_bits(std::vector<uint8_t> in);
private:
//! The parity check matrix
diff --git a/gr-fec/include/gnuradio/fec/depuncture_bb.h b/gr-fec/include/gnuradio/fec/depuncture_bb.h
index 8157487a04..3005a3e588 100644
--- a/gr-fec/include/gnuradio/fec/depuncture_bb.h
+++ b/gr-fec/include/gnuradio/fec/depuncture_bb.h
@@ -89,7 +89,7 @@ public:
* \param delay Delayed the puncturing pattern by shifting it
* \param symbol The symbol to reinsert into the stream (def=127)
*/
- static sptr make(int puncsize, int puncpat, int delay = 0, char symbol = 127);
+ static sptr make(int puncsize, int puncpat, int delay = 0, uint8_t symbol = 127);
};
} /* namespace fec */
diff --git a/gr-fec/include/gnuradio/fec/gf2mat.h b/gr-fec/include/gnuradio/fec/gf2mat.h
index 343b2ac5c3..a239b0e44e 100644
--- a/gr-fec/include/gnuradio/fec/gf2mat.h
+++ b/gr-fec/include/gnuradio/fec/gf2mat.h
@@ -17,7 +17,7 @@
class GF2Mat
{
//! The matrix H
- std::vector<std::vector<char>> H;
+ std::vector<std::vector<uint8_t>> H;
//! Number of rows in H
int M;
@@ -36,7 +36,7 @@ public:
GF2Mat(alist _list);
//! Initializes the class from a 2-D vector X
- GF2Mat(std::vector<std::vector<char>> X);
+ GF2Mat(std::vector<std::vector<uint8_t>> X);
//! Returns the variable M
int get_M();
@@ -78,7 +78,7 @@ public:
void add_rows(int i, int j);
//! Returns the variable H
- std::vector<std::vector<char>> get_H();
+ std::vector<std::vector<uint8_t>> get_H();
/*!
* \brief Obtains an equivalent representation of H for encoding
diff --git a/gr-fec/include/gnuradio/fec/gf2vec.h b/gr-fec/include/gnuradio/fec/gf2vec.h
index cb9aa4c5c8..2dd4f0d2ea 100644
--- a/gr-fec/include/gnuradio/fec/gf2vec.h
+++ b/gr-fec/include/gnuradio/fec/gf2vec.h
@@ -12,12 +12,13 @@
#define GF2VEC_H
#include <vector>
+#include <stdint.h>
class GF2Vec
{
private:
//! The vector vec
- std::vector<char> vec;
+ std::vector<uint8_t> vec;
//! Resize the vector
void resize(int size);
@@ -30,16 +31,16 @@ public:
GF2Vec(int size);
//! Returns the vector
- std::vector<char> get_vec();
+ std::vector<uint8_t> get_vec();
//! Returns the size of the vector
int size();
//! Resets the vector with the given input
- void set_vec(const std::vector<char>);
+ void set_vec(const std::vector<uint8_t>);
//! Access the ith element
- char& operator[](int i);
+ uint8_t& operator[](int i);
//! Overloading the operator '='
void operator=(GF2Vec x);
@@ -51,7 +52,7 @@ public:
friend GF2Vec operator+(GF2Vec a, GF2Vec b);
//! Overloading the operator '*'
- friend char operator*(GF2Vec a, GF2Vec b);
+ friend uint8_t operator*(GF2Vec a, GF2Vec b);
//! Prints the vector
void print_vec();
diff --git a/gr-fec/include/gnuradio/fec/polar_common.h b/gr-fec/include/gnuradio/fec/polar_common.h
index eab11f3e7b..bfebe6df26 100644
--- a/gr-fec/include/gnuradio/fec/polar_common.h
+++ b/gr-fec/include/gnuradio/fec/polar_common.h
@@ -16,6 +16,7 @@
#include <gnuradio/fec/api.h>
#include <vector>
+#include <stdint.h>
// Forward declaration for those objects. SWIG doesn't like them to be #include'd.
namespace gr {
@@ -62,7 +63,7 @@ public:
polar_common(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
~polar_common();
protected:
@@ -78,7 +79,7 @@ protected:
const unsigned int num_bytes) const;
std::vector<int> d_frozen_bit_positions;
- std::vector<char> d_frozen_bit_values;
+ std::vector<uint8_t> d_frozen_bit_values;
std::vector<int> d_info_bit_positions;
std::vector<int> d_info_bit_positions_reversed;
void setup_info_bit_positions_reversed();
diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_common.h b/gr-fec/include/gnuradio/fec/polar_decoder_common.h
index 8c6b596a22..9d410dbc3d 100644
--- a/gr-fec/include/gnuradio/fec/polar_decoder_common.h
+++ b/gr-fec/include/gnuradio/fec/polar_decoder_common.h
@@ -43,7 +43,7 @@ public:
polar_decoder_common(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
~polar_decoder_common();
// FECAPI
diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_sc.h b/gr-fec/include/gnuradio/fec/polar_decoder_sc.h
index fa6fa9539f..23886dc2f7 100644
--- a/gr-fec/include/gnuradio/fec/polar_decoder_sc.h
+++ b/gr-fec/include/gnuradio/fec/polar_decoder_sc.h
@@ -47,7 +47,7 @@ public:
static generic_decoder::sptr make(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
~polar_decoder_sc();
// FECAPI
@@ -57,7 +57,7 @@ private:
polar_decoder_sc(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
float* d_llr_vec;
unsigned char* d_u_hat_vec;
diff --git a/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h b/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h
index f66f818ad5..28a223821e 100644
--- a/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h
+++ b/gr-fec/include/gnuradio/fec/polar_decoder_sc_list.h
@@ -56,7 +56,7 @@ public:
int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
~polar_decoder_sc_list();
// FECAPI
@@ -67,7 +67,7 @@ private:
int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values);
+ std::vector<uint8_t> frozen_bit_values);
polar::scl_list* d_scl;
diff --git a/gr-fec/include/gnuradio/fec/polar_encoder.h b/gr-fec/include/gnuradio/fec/polar_encoder.h
index 2a7d056c77..c76a495050 100644
--- a/gr-fec/include/gnuradio/fec/polar_encoder.h
+++ b/gr-fec/include/gnuradio/fec/polar_encoder.h
@@ -53,7 +53,7 @@ public:
static generic_encoder::sptr make(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values,
+ std::vector<uint8_t> frozen_bit_values,
bool is_packed = false);
~polar_encoder();
@@ -70,7 +70,7 @@ private:
polar_encoder(int block_size,
int num_info_bits,
std::vector<int>& frozen_bit_positions,
- std::vector<char>& frozen_bit_values,
+ std::vector<uint8_t>& frozen_bit_values,
bool is_packed);
bool d_is_packed;
diff --git a/gr-fec/lib/alist.cc b/gr-fec/lib/alist.cc
index 9cedf42e99..b0a6ba34b3 100644
--- a/gr-fec/lib/alist.cc
+++ b/gr-fec/lib/alist.cc
@@ -12,9 +12,9 @@
alist::alist(const char* fname) : data_ok(false) { read(fname); }
-std::vector<std::vector<char>> alist::get_matrix()
+std::vector<std::vector<uint8_t>> alist::get_matrix()
{
- std::vector<std::vector<char>> mat;
+ std::vector<std::vector<uint8_t>> mat;
mat.resize(M);
for (int i = 0; i < M; i++) {
mat[i].resize(N);
diff --git a/gr-fec/lib/awgn_bp.cc b/gr-fec/lib/awgn_bp.cc
index 5d6d3bb6f8..43b73cf875 100644
--- a/gr-fec/lib/awgn_bp.cc
+++ b/gr-fec/lib/awgn_bp.cc
@@ -134,7 +134,7 @@ void awgn_bp::update_vars()
}
}
-std::vector<char> awgn_bp::get_estimate() { return estimate; }
+std::vector<uint8_t> awgn_bp::get_estimate() { return estimate; }
void awgn_bp::compute_init_estimate(std::vector<float> rx_word)
{
@@ -160,9 +160,9 @@ void awgn_bp::set_K(int k) { K = k; }
int awgn_bp::get_K() { return K; }
-std::vector<char> awgn_bp::get_syndrome(std::vector<char> codeword)
+std::vector<uint8_t> awgn_bp::get_syndrome(std::vector<uint8_t> codeword)
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd.resize(N - K);
GF2Vec in_bvec;
in_bvec.set_vec(codeword);
@@ -172,9 +172,9 @@ std::vector<char> awgn_bp::get_syndrome(std::vector<char> codeword)
return synd;
}
-std::vector<char> awgn_bp::get_syndrome()
+std::vector<uint8_t> awgn_bp::get_syndrome()
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd.resize(N - K);
GF2Vec in_bvec;
in_bvec.set_vec(estimate);
@@ -184,9 +184,9 @@ std::vector<char> awgn_bp::get_syndrome()
return synd;
}
-bool awgn_bp::is_codeword(std::vector<char> codeword)
+bool awgn_bp::is_codeword(std::vector<uint8_t> codeword)
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd = get_syndrome(codeword);
bool is_code;
is_code = true;
@@ -200,7 +200,7 @@ bool awgn_bp::is_codeword(std::vector<char> codeword)
bool awgn_bp::is_codeword()
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd = get_syndrome();
bool is_code;
is_code = true;
@@ -216,7 +216,7 @@ void awgn_bp::set_max_iterations(int k) { max_iterations = k; }
int awgn_bp::get_max_iterations() { return max_iterations; }
-std::vector<char> awgn_bp::decode(std::vector<float> rx_word, int* niteration)
+std::vector<uint8_t> awgn_bp::decode(std::vector<float> rx_word, int* niteration)
{
*niteration = 0;
compute_init_estimate(rx_word);
diff --git a/gr-fec/lib/cldpc.cc b/gr-fec/lib/cldpc.cc
index f4fb9f28a5..8a21d33c78 100644
--- a/gr-fec/lib/cldpc.cc
+++ b/gr-fec/lib/cldpc.cc
@@ -38,9 +38,9 @@ void cldpc::set_alist(const alist _list)
K = N - rank_H;
}
-std::vector<char> cldpc::get_systematic_bits(std::vector<char> in)
+std::vector<uint8_t> cldpc::get_systematic_bits(std::vector<uint8_t> in)
{
- std::vector<char> data;
+ std::vector<uint8_t> data;
data.resize(K);
int index;
for (size_t i = 0; i < K; i++) {
@@ -58,9 +58,9 @@ void cldpc::print_permute()
std::cout << "\n";
}
-std::vector<char> cldpc::syndrome(const std::vector<char> in)
+std::vector<uint8_t> cldpc::syndrome(const std::vector<uint8_t> in)
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd.resize(rank_H);
GF2Vec in_bvec;
in_bvec.set_vec(in);
@@ -70,9 +70,9 @@ std::vector<char> cldpc::syndrome(const std::vector<char> in)
return synd;
}
-bool cldpc::is_codeword(const std::vector<char> in)
+bool cldpc::is_codeword(const std::vector<uint8_t> in)
{
- std::vector<char> synd;
+ std::vector<uint8_t> synd;
synd = syndrome(in);
bool is_code;
is_code = true;
@@ -84,7 +84,7 @@ bool cldpc::is_codeword(const std::vector<char> in)
return is_code;
}
-std::vector<char> cldpc::encode(std::vector<char> dataword)
+std::vector<uint8_t> cldpc::encode(std::vector<uint8_t> dataword)
{
if (dataword.size() == K) {
GF2Vec x(N);
@@ -103,7 +103,7 @@ std::vector<char> cldpc::encode(std::vector<char> dataword)
return y.get_vec();
} else {
throw std::runtime_error("bad vector length!");
- return std::vector<char>();
+ return std::vector<uint8_t>();
}
}
diff --git a/gr-fec/lib/depuncture_bb_impl.cc b/gr-fec/lib/depuncture_bb_impl.cc
index d282170040..e006725797 100644
--- a/gr-fec/lib/depuncture_bb_impl.cc
+++ b/gr-fec/lib/depuncture_bb_impl.cc
@@ -23,13 +23,13 @@
namespace gr {
namespace fec {
-depuncture_bb::sptr depuncture_bb::make(int puncsize, int puncpat, int delay, char symbol)
+depuncture_bb::sptr depuncture_bb::make(int puncsize, int puncpat, int delay, uint8_t symbol)
{
return gnuradio::get_initial_sptr(
new depuncture_bb_impl(puncsize, puncpat, delay, symbol));
}
-depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat, int delay, char symbol)
+depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat, int delay, uint8_t symbol)
: block("depuncture_bb",
io_signature::make(1, 1, sizeof(unsigned char)),
io_signature::make(1, 1, sizeof(unsigned char))),
diff --git a/gr-fec/lib/depuncture_bb_impl.h b/gr-fec/lib/depuncture_bb_impl.h
index 9be680eb36..4a7c1f0422 100644
--- a/gr-fec/lib/depuncture_bb_impl.h
+++ b/gr-fec/lib/depuncture_bb_impl.h
@@ -26,7 +26,7 @@ private:
char d_sym;
public:
- depuncture_bb_impl(int puncsize, int puncpat, int delay = 0, char symbol = 127);
+ depuncture_bb_impl(int puncsize, int puncpat, int delay = 0, uint8_t symbol = 127);
~depuncture_bb_impl();
int general_work(int noutput_items,
diff --git a/gr-fec/lib/gf2mat.cc b/gr-fec/lib/gf2mat.cc
index a41f42b486..d07c6e2f3d 100644
--- a/gr-fec/lib/gf2mat.cc
+++ b/gr-fec/lib/gf2mat.cc
@@ -24,7 +24,7 @@ GF2Mat::GF2Mat(int m, int n)
}
}
-GF2Mat::GF2Mat(std::vector<std::vector<char>> X)
+GF2Mat::GF2Mat(std::vector<std::vector<uint8_t>> X)
{
M = X.size();
N = X[0].size();
@@ -179,4 +179,4 @@ GF2Mat GF2Mat::get_G(std::vector<int>& permute, int& rank)
return G;
}
-std::vector<std::vector<char>> GF2Mat::get_H() { return H; }
+std::vector<std::vector<uint8_t>> GF2Mat::get_H() { return H; }
diff --git a/gr-fec/lib/gf2vec.cc b/gr-fec/lib/gf2vec.cc
index 9f0153f6c8..0c12271b03 100644
--- a/gr-fec/lib/gf2vec.cc
+++ b/gr-fec/lib/gf2vec.cc
@@ -13,13 +13,13 @@
GF2Vec::GF2Vec(int size) { vec.resize(size); }
-void GF2Vec::set_vec(const std::vector<char> in) { vec = in; }
+void GF2Vec::set_vec(const std::vector<uint8_t> in) { vec = in; }
-std::vector<char> GF2Vec::get_vec() { return vec; }
+std::vector<uint8_t> GF2Vec::get_vec() { return vec; }
int GF2Vec::size() { return vec.size(); }
-char& GF2Vec::operator[](int i) { return vec[i]; }
+uint8_t& GF2Vec::operator[](int i) { return vec[i]; }
GF2Vec operator+(GF2Vec a, GF2Vec b)
{
@@ -40,7 +40,7 @@ GF2Vec GF2Vec::sub_vector(int from, int to)
return x;
}
-char operator*(GF2Vec a, GF2Vec b)
+uint8_t operator*(GF2Vec a, GF2Vec b)
{
char sum;
sum = char(0);
diff --git a/gr-fec/lib/ldpc_decoder.cc b/gr-fec/lib/ldpc_decoder.cc
index 166e374d1d..2daa93aad3 100644
--- a/gr-fec/lib/ldpc_decoder.cc
+++ b/gr-fec/lib/ldpc_decoder.cc
@@ -84,8 +84,8 @@ void ldpc_decoder::generic_work(void* inBuffer, void* outBuffer)
}
int n_iterations = 0;
- std::vector<char> estimate(d_spa.decode(rx, &n_iterations));
- std::vector<char> data(d_code.get_systematic_bits(estimate));
+ std::vector<uint8_t> estimate(d_spa.decode(rx, &n_iterations));
+ std::vector<uint8_t> data(d_code.get_systematic_bits(estimate));
memcpy(&out[j], &data[0], d_code.dimension());
d_iterations = n_iterations;
diff --git a/gr-fec/lib/ldpc_encoder_impl.cc b/gr-fec/lib/ldpc_encoder_impl.cc
index 9ed72259e6..103cf38379 100644
--- a/gr-fec/lib/ldpc_encoder_impl.cc
+++ b/gr-fec/lib/ldpc_encoder_impl.cc
@@ -46,9 +46,9 @@ void ldpc_encoder_impl::generic_work(void* inBuffer, void* outBuffer)
{
const unsigned char* in = (const unsigned char*)inBuffer;
unsigned char* out = (unsigned char*)outBuffer;
- std::vector<char> inbuf(inputSize);
+ std::vector<uint8_t> inbuf(inputSize);
memcpy(&inbuf[0], in, inputSize);
- std::vector<char> coded(d_code.encode(inbuf));
+ std::vector<uint8_t> coded(d_code.encode(inbuf));
memcpy(&out[0], &coded[0], coded.size());
}
diff --git a/gr-fec/lib/polar_common.cc b/gr-fec/lib/polar_common.cc
index 589c7a5f8f..be765671b7 100644
--- a/gr-fec/lib/polar_common.cc
+++ b/gr-fec/lib/polar_common.cc
@@ -31,7 +31,7 @@ namespace code {
polar_common::polar_common(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values)
+ std::vector<uint8_t> frozen_bit_values)
: d_frozen_bit_positions(frozen_bit_positions),
d_frozen_bit_values(frozen_bit_values),
d_block_size(block_size),
diff --git a/gr-fec/lib/polar_decoder_common.cc b/gr-fec/lib/polar_decoder_common.cc
index 4a59cbfe3f..392451737e 100644
--- a/gr-fec/lib/polar_decoder_common.cc
+++ b/gr-fec/lib/polar_decoder_common.cc
@@ -27,7 +27,7 @@ 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)
+ std::vector<uint8_t> frozen_bit_values)
: polar_common(block_size, num_info_bits, frozen_bit_positions, frozen_bit_values),
d_frozen_bit_counter(0)
{
diff --git a/gr-fec/lib/polar_decoder_sc.cc b/gr-fec/lib/polar_decoder_sc.cc
index 29493d4760..9d694bf3bb 100644
--- a/gr-fec/lib/polar_decoder_sc.cc
+++ b/gr-fec/lib/polar_decoder_sc.cc
@@ -26,7 +26,7 @@ namespace code {
generic_decoder::sptr polar_decoder_sc::make(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values)
+ std::vector<uint8_t> frozen_bit_values)
{
return generic_decoder::sptr(new polar_decoder_sc(
block_size, num_info_bits, frozen_bit_positions, frozen_bit_values));
@@ -35,7 +35,7 @@ generic_decoder::sptr polar_decoder_sc::make(int block_size,
polar_decoder_sc::polar_decoder_sc(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values)
+ std::vector<uint8_t> frozen_bit_values)
: polar_decoder_common(
block_size, num_info_bits, frozen_bit_positions, frozen_bit_values)
{
diff --git a/gr-fec/lib/polar_decoder_sc_list.cc b/gr-fec/lib/polar_decoder_sc_list.cc
index 9067fdba67..7f537cde18 100644
--- a/gr-fec/lib/polar_decoder_sc_list.cc
+++ b/gr-fec/lib/polar_decoder_sc_list.cc
@@ -28,7 +28,7 @@ generic_decoder::sptr polar_decoder_sc_list::make(int max_list_size,
int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values)
+ std::vector<uint8_t> frozen_bit_values)
{
return generic_decoder::sptr(new polar_decoder_sc_list(max_list_size,
block_size,
@@ -41,7 +41,7 @@ polar_decoder_sc_list::polar_decoder_sc_list(int max_list_size,
int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values)
+ std::vector<uint8_t> frozen_bit_values)
: polar_decoder_common(
block_size, num_info_bits, frozen_bit_positions, frozen_bit_values)
{
diff --git a/gr-fec/lib/polar_decoder_sc_systematic.cc b/gr-fec/lib/polar_decoder_sc_systematic.cc
index e743edabb2..20fbad2d38 100644
--- a/gr-fec/lib/polar_decoder_sc_systematic.cc
+++ b/gr-fec/lib/polar_decoder_sc_systematic.cc
@@ -30,7 +30,7 @@ generic_decoder::sptr polar_decoder_sc_systematic::make(
polar_decoder_sc_systematic::polar_decoder_sc_systematic(
int block_size, int num_info_bits, std::vector<int> frozen_bit_positions)
: polar_decoder_common(
- block_size, num_info_bits, frozen_bit_positions, std::vector<char>())
+ block_size, num_info_bits, frozen_bit_positions, std::vector<uint8_t>())
{
d_llr_vec = (float*)volk_malloc(sizeof(float) * block_size * (block_power() + 1),
volk_get_alignment());
diff --git a/gr-fec/lib/polar_encoder.cc b/gr-fec/lib/polar_encoder.cc
index ad35c0cc37..568a0b8e5e 100644
--- a/gr-fec/lib/polar_encoder.cc
+++ b/gr-fec/lib/polar_encoder.cc
@@ -28,7 +28,7 @@ namespace code {
generic_encoder::sptr polar_encoder::make(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions,
- std::vector<char> frozen_bit_values,
+ std::vector<uint8_t> frozen_bit_values,
bool is_packed)
{
return generic_encoder::sptr(new polar_encoder(
@@ -38,7 +38,7 @@ generic_encoder::sptr polar_encoder::make(int block_size,
polar_encoder::polar_encoder(int block_size,
int num_info_bits,
std::vector<int>& frozen_bit_positions,
- std::vector<char>& frozen_bit_values,
+ std::vector<uint8_t>& frozen_bit_values,
bool is_packed)
: polar_common(block_size, num_info_bits, frozen_bit_positions, frozen_bit_values),
d_is_packed(is_packed)
diff --git a/gr-fec/lib/polar_encoder_systematic.cc b/gr-fec/lib/polar_encoder_systematic.cc
index 1bff485504..605a83dcb9 100644
--- a/gr-fec/lib/polar_encoder_systematic.cc
+++ b/gr-fec/lib/polar_encoder_systematic.cc
@@ -30,7 +30,7 @@ generic_encoder::sptr polar_encoder_systematic::make(
polar_encoder_systematic::polar_encoder_systematic(int block_size,
int num_info_bits,
std::vector<int> frozen_bit_positions)
- : polar_common(block_size, num_info_bits, frozen_bit_positions, std::vector<char>())
+ : polar_common(block_size, num_info_bits, frozen_bit_positions, std::vector<uint8_t>())
{
d_volk_syst_intermediate = (unsigned char*)volk_malloc(
sizeof(unsigned char) * block_size, volk_get_alignment());