GNU Radio C++ API Reference: gr::fec::code::polar_common Class Reference

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
gr::fec::code::polar_common Class Reference
GNU Radio C++ Signal Processing Blocks » Error Coding and Decoding

POLAR code common operations and attributes. More...

`#include <gnuradio/fec/polar_common.h>`

## Public Member Functions
| polar_common (int block_size, int num_info_bits, std::vector< int > frozen_bit_positions, std::vector< uint8_t > frozen_bit_values)
| ~polar_common ()

## Protected Member Functions
int | block_size () const
int | block_power () const
int | num_info_bits () const
long | bit_reverse (long value, int active_bits) const
void | print_packed_bit_array (const unsigned char *printed_array, const int num_bytes) const
void | print_unpacked_bit_array (const unsigned char *bits, const unsigned int num_bytes) const
void | setup_info_bit_positions_reversed ()
void | setup_volk_vectors ()
void | volk_encode (unsigned char *out_buf, const unsigned char *in_buf)
void | volk_encode_block (unsigned char *out_buf, unsigned char *in_buf)

## Protected Attributes
std::vector< int > | d_frozen_bit_positions
std::vector< uint8_t > | d_frozen_bit_values
std::vector< int > | d_info_bit_positions
std::vector< int > | d_info_bit_positions_reversed
volk::vector< unsigned char > | d_volk_temp
volk::vector< unsigned char > | d_volk_frozen_bit_mask
volk::vector< unsigned char > | d_volk_frozen_bits

## Detailed Description

POLAR code common operations and attributes.

Polar codes are based on this paper by Erdal Arikan "Channel Polarization: A Method for Constructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels", 2009 block holds common information for encoders and decoders. All polar encoder/decoders inherit from polar_common.

class holds common info. It is common to all encoders and decoders.

## Constructor & Destructor Documentation

## ◆ polar_common()

gr::fec::code::polar_common::polar_common | ( | int | block_size,
|  | int | num_info_bits,
|  | std::vector< int > | frozen_bit_positions,
|  | std::vector< uint8_t > | frozen_bit_values )

Parameters

  block_size | codeword size. MUST be a power of 2.
  num_info_bits | represents the number of information bits in a block. Also called frame_size. <= block_size
  frozen_bit_positions | is an integer vector which defines the position of all frozen bits in a block. Its size MUST be equal to block_size - num_info_bits. Also it must be sorted and every position must only occur once.
  frozen_bit_values | holds an unpacked byte for every frozen bit position. It defines if a frozen bit is fixed to '0' or '1'. Defaults to all ZERO.

References block_size(), and num_info_bits().

## ◆ ~polar_common()

gr::fec::code::polar_common::~polar_common | ( |  | ) |

## Member Function Documentation

## ◆ bit_reverse()

long gr::fec::code::polar_common::bit_reverse | ( | long | value,
|  | int | active_bits ) const
| protected

## ◆ block_power()

int gr::fec::code::polar_common::block_power | ( |  | ) | const
| inlineprotected

## ◆ block_size()

int gr::fec::code::polar_common::block_size | ( |  | ) | const
| inlineprotected

Referenced by gr::fec::code::polar_decoder_sc::generic_work(), gr::fec::code::polar_decoder_sc_list::generic_work(), gr::fec::code::polar_decoder_sc_systematic::generic_work(), gr::fec::code::polar_decoder_common::get_input_size(), gr::fec::code::polar_encoder::get_output_size(), gr::fec::code::polar_encoder_systematic::get_output_size(), gr::fec::code::polar_decoder_sc::make(), gr::fec::code::polar_decoder_sc_list::make(), gr::fec::code::polar_decoder_sc_systematic::make(), gr::fec::code::polar_encoder::make(), gr::fec::code::polar_encoder_systematic::make(), polar_common(), gr::fec::code::polar_decoder_common::polar_decoder_common(), and gr::fec::code::polar_encoder_systematic::~polar_encoder_systematic().

## ◆ num_info_bits()

int gr::fec::code::polar_common::num_info_bits | ( |  | ) | const
| inlineprotected

Referenced by gr::fec::code::polar_decoder_sc::generic_work(), gr::fec::code::polar_decoder_sc_list::generic_work(), gr::fec::code::polar_decoder_sc_systematic::generic_work(), gr::fec::code::polar_encoder::get_input_size(), gr::fec::code::polar_encoder_systematic::get_input_size(), gr::fec::code::polar_decoder_common::get_output_size(), gr::fec::code::polar_decoder_sc::make(), gr::fec::code::polar_decoder_sc_list::make(), gr::fec::code::polar_decoder_sc_systematic::make(), gr::fec::code::polar_encoder::make(), gr::fec::code::polar_encoder_systematic::make(), polar_common(), gr::fec::code::polar_decoder_common::polar_decoder_common(), and gr::fec::code::polar_encoder_systematic::~polar_encoder_systematic().

## ◆ print_packed_bit_array()

void gr::fec::code::polar_common::print_packed_bit_array | ( | const unsigned char * | printed_array,
|  | const int | num_bytes ) const
| protected

## ◆ print_unpacked_bit_array()

void gr::fec::code::polar_common::print_unpacked_bit_array | ( | const unsigned char * | bits,
|  | const unsigned int | num_bytes ) const
| protected

## ◆ setup_info_bit_positions_reversed()

void gr::fec::code::polar_common::setup_info_bit_positions_reversed | ( |  | ) |
| protected

## ◆ setup_volk_vectors()

void gr::fec::code::polar_common::setup_volk_vectors | ( |  | ) |
| protected

## ◆ volk_encode()

void gr::fec::code::polar_common::volk_encode | ( | unsigned char * | out_buf,
|  | const unsigned char * | in_buf )
| protected

## ◆ volk_encode_block()

void gr::fec::code::polar_common::volk_encode_block | ( | unsigned char * | out_buf,
|  | unsigned char * | in_buf )
| protected

## Member Data Documentation

## ◆ d_frozen_bit_positions

std::vector<int> gr::fec::code::polar_common::d_frozen_bit_positions
| protected

## ◆ d_frozen_bit_values

std::vector<uint8_t> gr::fec::code::polar_common::d_frozen_bit_values
| protected

## ◆ d_info_bit_positions

std::vector<int> gr::fec::code::polar_common::d_info_bit_positions
| protected

## ◆ d_info_bit_positions_reversed

std::vector<int> gr::fec::code::polar_common::d_info_bit_positions_reversed
| protected

## ◆ d_volk_frozen_bit_mask

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_frozen_bit_mask
| protected

## ◆ d_volk_frozen_bits

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_frozen_bits
| protected

## ◆ d_volk_temp

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_temp
| protected

The documentation for this class was generated from the following file:

- polar_common.h