12 #ifndef INCLUDED_FEC_POLAR_ENCODER_H
13 #define INCLUDED_FEC_POLAR_ENCODER_H
55 std::vector<int> frozen_bit_positions,
56 std::vector<uint8_t> frozen_bit_values,
57 bool is_packed =
false);
62 double rate()
override {
return (1.0 * get_input_size() / get_output_size()); };
63 int get_input_size()
override {
return num_info_bits() / (d_is_packed ? 8 : 1); };
69 return d_is_packed ?
"packed_bits" :
"none";
75 std::vector<int>& frozen_bit_positions,
76 std::vector<uint8_t>& frozen_bit_values,
81 volk::vector<unsigned char> make_prototype()
const;
84 const volk::vector<unsigned char>
85 d_frozen_bit_prototype;
87 void insert_packed_frozen_bits_and_reverse(
unsigned char* target,
88 const unsigned char* input)
const;
89 void insert_unpacked_bit_into_packed_array_at_position(
unsigned char* target,
90 const unsigned char bit,
92 void insert_packet_bit_into_packed_array_at_position(
unsigned char* target,
93 const unsigned char bit,
95 const int bit_pos)
const;
98 void encode_vector_packed(
unsigned char* target)
const;
99 void encode_vector_packed_subbyte(
unsigned char* target)
const;
100 void encode_packed_byte(
unsigned char* target)
const;
101 void encode_vector_packed_interbyte(
unsigned char* target)
const;
POLAR code common operations and attributes.
Definition: polar_common.h:50
POLAR encoder for basic details see 'polar_common' class.
Definition: polar_encoder.h:33
void generic_work(void *in_buffer, void *out_buffer) override
const char * get_output_conversion() override
Definition: polar_encoder.h:67
~polar_encoder() override
static generic_encoder::sptr make(int block_size, int num_info_bits, std::vector< int > frozen_bit_positions, std::vector< uint8_t > frozen_bit_values, bool is_packed=false)
const char * get_input_conversion() override
Definition: polar_encoder.h:66
double rate() override
Definition: polar_encoder.h:62
int get_output_size() override
Definition: polar_encoder.h:64
bool set_frame_size(unsigned int frame_size) override
Definition: polar_encoder.h:65
int get_input_size() override
Definition: polar_encoder.h:63
Definition: generic_encoder.h:23
std::shared_ptr< generic_encoder > sptr
Definition: generic_encoder.h:37
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29