60 logexp_table = construct_logexp_table();
63ivec LLR_calc_unit::construct_logexp_table()
66 for (
int i = 0;
i < Dint2;
i++) {
67 double x =
pow2(
static_cast<double>(Dint3 - Dint1)) *
i;
70 it_assert(
length(result) == Dint2,
"Ldpc_codec::construct_logexp_table()");
79 for (
int i = 0;
i < n;
i++) {
89 for (
int i = 0;
i < n;
i++) {
100 for (
int i = 0;
i < m;
i++) {
101 for (
int j = 0;
j < n;
j++) {
113 for (
int i = 0;
i < m;
i++) {
114 for (
int j = 0;
j < n;
j++) {
164 os <<
"---------- LLR calculation unit -----------------" << std::endl;
165 os <<
"LLR_calc_unit table properties:" << std::endl;
166 os <<
"The granularity in the LLR representation is "
167 <<
pow2(
static_cast<double>(-
lcu.Dint1)) << std::endl;
168 os <<
"The LLR scale factor is " << (1 <<
lcu.Dint1) << std::endl;
169 os <<
"The largest LLR that can be represented is "
170 <<
lcu.to_double(QLLR_MAX) << std::endl;
171 os <<
"The table resolution is "
172 <<
pow2(
static_cast<double>(
lcu.Dint3 -
lcu.Dint1)) << std::endl;
173 os <<
"The number of entries in the table is " <<
lcu.Dint2 << std::endl;
174 os <<
"The tables truncates at the LLR value "
175 <<
pow2(
static_cast<double>(
lcu.Dint3 -
lcu.Dint1)) *
lcu.Dint2
177 os <<
"-------------------------------------------------" << std::endl;
Log-likelihood algebra calculation unit.
QLLR Boxplus(QLLR a, QLLR b) const
Hagenauer's "Boxplus" operator.
void init_llr_tables(short int Dint1=12, short int Dint2=300, short int Dint3=7)
Set the quantization and table parameters.
ivec get_Dint()
Retrieve the table resolution values.
QLLR to_qllr(double l) const
Convert a "real" LLR value to an LLR type.
QLLR logexp(QLLR x) const
Logexp operator.
double to_double(QLLR l) const
Convert an LLR type to a "real" LLR.
LLR_calc_unit()
Constructor, using the default table resolution.
int rows() const
The number of rows.
int cols() const
The number of columns.
#define it_info_debug(s)
Print information message if NDEBUG is not defined.
#define it_assert(t, s)
Abort if t is not true.
double pow2(double x)
Calculate two to the power of x (2^x)
int length(const Vec< T > &v)
Length of vector.
Class for numerically efficient log-likelihood algebra.
std::ostream & operator<<(std::ostream &output, const bin &inbin)
Output stream of bin.