AFF3CT
A Fast Forward Error Correction Tool!
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Decoder_i< B, R > Class Template Referenceabstract

A Decoder is an algorithm dedicated to find the initial sequence of information bits (before the noise). More...

#include <Decoder.hpp>

Inheritance diagram for Decoder_i< B, R >:
Module SC_Decoder< B, R > Decoder_NO< B, R > Decoder_polar_SC_fast_sys< B, R, API_polar > Decoder_polar_SC_naive< B, R, F, G, H > Decoder_polar_SCAN_naive< B, R, I, F, V, H > Decoder_polar_SCL_naive< B, R, F, G > Decoder_RA< B, R > Decoder_repetition< B, R > Decoder_SISO< B, R > Decoder_turbo< B, R >

Public Member Functions

 Decoder_i (const int K, const int N, const int n_frames=1, const int simd_inter_frame_level=1, std::string name="Decoder_i")
 Constructor. More...
 
virtual ~Decoder_i ()
 Destructor.
 
void hard_decode (const mipp::vector< R > &Y_N, mipp::vector< B > &V_K, const bool load=true, const bool store=true, const bool store_fast=false, const bool unpack=false)
 Decodes the noisy frame. More...
 
std::chrono::nanoseconds get_load_duration () const
 Gets the duration of the data loading in the decoding process. More...
 
std::chrono::nanoseconds get_decode_duration () const
 Gets the duration of the decoding process (without loads and stores). More...
 
std::chrono::nanoseconds get_store_duration () const
 Gets the duration of the data storing in the decoding process. More...
 
int get_simd_inter_frame_level () const
 Gets the number of frames absorbed by the SIMD instructions. More...
 
- Public Member Functions inherited from Module
 Module (const int n_frames=1, const std::string name="Module")
 Constructor. More...
 
virtual ~Module ()
 Destructor.
 
virtual void set_n_frames (const int n_frames)
 Set the number of frames. More...
 
virtual int get_n_frames () const
 Get the number of frames. More...
 
void rename (const std::string name)
 Rename the Module. More...
 

Protected Member Functions

virtual void load (const mipp::vector< R > &Y_N)=0
 Loads the noisy frame into the Decoder. More...
 
virtual void hard_decode ()=0
 Decodes the noisy frame (have to be called after the load method).
 
virtual void store (mipp::vector< B > &V_K) const =0
 Stores the decoded information bits (have to be called after the decode method). More...
 
virtual void store_fast (mipp::vector< B > &V) const
 Stores the decoded codeword, may or may not contain the redundancy bits (parity) (should be called over the standard store method). More...
 
virtual void unpack (mipp::vector< B > &V) const
 Can be called after the store_fast method if store_fast return the bits in a non-standard format. The unpack method converts those bits into a standard format. More...
 

Protected Attributes

const int K
 
const int N
 
const int simd_inter_frame_level
 
- Protected Attributes inherited from Module
int n_frames
 
std::string name
 

Detailed Description

template<typename B, typename R>
class Decoder_i< B, R >

A Decoder is an algorithm dedicated to find the initial sequence of information bits (before the noise).

Template Parameters
Btype of the bits in the Decoder.
Rtype of the reals (floating-point or fixed-point representation) in the Decoder.

The Decoder takes a soft input (real numbers) and return a hard output (bits). Please use Decoder for inheritance (instead of Decoder_i).

Constructor & Destructor Documentation

template<typename B , typename R >
Decoder_i< B, R >::Decoder_i ( const int  K,
const int  N,
const int  n_frames = 1,
const int  simd_inter_frame_level = 1,
std::string  name = "Decoder_i< B, R >" 
)
inline

Constructor.

Parameters
Knumber of information bits in the frame.
Nsize of one frame.
n_framesnumber of frames to process in the Decoder.
simd_inter_frame_levelnumber of frames absorbed by the SIMD instructions.
nameDecoder's name.

Member Function Documentation

template<typename B , typename R >
std::chrono::nanoseconds Decoder_i< B, R >::get_decode_duration ( ) const
inline

Gets the duration of the decoding process (without loads and stores).

Returns
the duration of the decoding process (without loads and stores).
template<typename B , typename R >
std::chrono::nanoseconds Decoder_i< B, R >::get_load_duration ( ) const
inline

Gets the duration of the data loading in the decoding process.

Returns
the duration of the data loading in the decoding process.
template<typename B , typename R >
int Decoder_i< B, R >::get_simd_inter_frame_level ( ) const
inline

Gets the number of frames absorbed by the SIMD instructions.

Returns
the number of frames absorbed by the SIMD instructions.
template<typename B , typename R >
std::chrono::nanoseconds Decoder_i< B, R >::get_store_duration ( ) const
inline

Gets the duration of the data storing in the decoding process.

Returns
the duration of the data storing in the decoding process.
template<typename B , typename R >
void Decoder_i< B, R >::hard_decode ( const mipp::vector< R > &  Y_N,
mipp::vector< B > &  V_K,
const bool  load = true,
const bool  store = true,
const bool  store_fast = false,
const bool  unpack = false 
)
inline

Decodes the noisy frame.

Parameters
Y_Na noisy frame.
V_Kan decoded codeword (only the information bits).
loadtrue = performs the data loading, false = do not load the data in the decoder.
storetrue = performs the data storing, false = do not store the data in the decoder.
store_fasttrue = enables the fast data storage.
unpacktrue = unpacks the data after the fast storage.
template<typename B , typename R >
virtual void Decoder_i< B, R >::load ( const mipp::vector< R > &  Y_N)
protectedpure virtual
template<typename B , typename R >
virtual void Decoder_i< B, R >::store ( mipp::vector< B > &  V_K) const
protectedpure virtual
template<typename B , typename R >
virtual void Decoder_i< B, R >::store_fast ( mipp::vector< B > &  V) const
inlineprotectedvirtual

Stores the decoded codeword, may or may not contain the redundancy bits (parity) (should be called over the standard store method).

Parameters
Vthe decoded codeword.

Reimplemented in Decoder_polar_SC_fast_sys< B, R, API_polar >.

template<typename B , typename R >
virtual void Decoder_i< B, R >::unpack ( mipp::vector< B > &  V) const
inlineprotectedvirtual

Can be called after the store_fast method if store_fast return the bits in a non-standard format. The unpack method converts those bits into a standard format.

Parameters
Vthe decoded and unpacked codeword.

Reimplemented in Decoder_polar_SC_fast_sys< B, R, API_polar >.

Member Data Documentation

template<typename B , typename R >
const int Decoder_i< B, R >::K
protected

Number of information bits in one frame

template<typename B , typename R >
const int Decoder_i< B, R >::N
protected

Size of one frame (= number of bits in one frame)

template<typename B , typename R >
const int Decoder_i< B, R >::simd_inter_frame_level
protected

Number of frames absorbed by the SIMD instructions.


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