60 logexp_table = construct_logexp_table();
63 ivec 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++) {
102 result.set(i, j,
to_qllr(l(i, j)));
113 for (
int i = 0; i < m; i++) {
114 for (
int j = 0; j < n; j++) {
125 QLLR a_abs = (a > 0 ? a : -a);
126 QLLR b_abs = (b > 0 ? b : -b);
127 QLLR minabs = (a_abs > b_abs ? b_abs : a_abs);
128 QLLR term1 = (a > 0 ? (b > 0 ? minabs : -minabs)
129 : (b > 0 ? -minabs : minabs));
148 QLLR result = term1 + term2 - term3;
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 "
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;