1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: itpp::LLR_calc_unit Class Reference</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::LLR_calc_unit Class Reference</h1><!-- doxytag: class="itpp::LLR_calc_unit" -->Log-likelihood algebra calculation unit. |
---|
72 | <a href="#_details">More...</a> |
---|
73 | <p> |
---|
74 | <code>#include <<a class="el" href="llr_8h-source.html">llr.h</a>></code> |
---|
75 | <p> |
---|
76 | |
---|
77 | <p> |
---|
78 | <a href="classitpp_1_1LLR__calc__unit-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
79 | <tr><td></td></tr> |
---|
80 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9a5a2abb2ef8b62266207e67f2a0ff4"></a><!-- doxytag: member="itpp::LLR_calc_unit::LLR_calc_unit" ref="d9a5a2abb2ef8b62266207e67f2a0ff4" args="()" --> |
---|
82 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#d9a5a2abb2ef8b62266207e67f2a0ff4">LLR_calc_unit</a> ()</td></tr> |
---|
83 | |
---|
84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor, using the default table resolution. <br></td></tr> |
---|
85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#b3e59cb704e3a20d4060f968b9360f15">LLR_calc_unit</a> (short int Dint1, short int Dint2, short int Dint3)</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor, using a specific table resolution. <a href="#b3e59cb704e3a20d4060f968b9360f15"></a><br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#531b0a4eca593e439a39ba9de42ee68c">init_llr_tables</a> (short int Dint1=12, short int Dint2=300, short int Dint3=7)</td></tr> |
---|
89 | |
---|
90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the quantization and table parameters. <a href="#531b0a4eca593e439a39ba9de42ee68c"></a><br></td></tr> |
---|
91 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fdc07e6395053a2a9441c8b13cd2d8ad"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_qllr" ref="fdc07e6395053a2a9441c8b13cd2d8ad" args="(double l) const " --> |
---|
92 | <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#fdc07e6395053a2a9441c8b13cd2d8ad">to_qllr</a> (double l) const </td></tr> |
---|
93 | |
---|
94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a "real" LLR value to an LLR type. <br></td></tr> |
---|
95 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2562eb9badfe048e9fc4263a604fd4be"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_qllr" ref="2562eb9badfe048e9fc4263a604fd4be" args="(const vec &l) const " --> |
---|
96 | <a class="el" href="classitpp_1_1Vec.html">QLLRvec</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#2562eb9badfe048e9fc4263a604fd4be">to_qllr</a> (const vec &l) const </td></tr> |
---|
97 | |
---|
98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a vector of "real" LLR values to an LLR type. <br></td></tr> |
---|
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="61490f7055589c9ac123b0517a6d3540"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_qllr" ref="61490f7055589c9ac123b0517a6d3540" args="(const mat &l) const " --> |
---|
100 | <a class="el" href="classitpp_1_1Mat.html">QLLRmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#61490f7055589c9ac123b0517a6d3540">to_qllr</a> (const mat &l) const </td></tr> |
---|
101 | |
---|
102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a matrix of "real" LLR values to an LLR type. <br></td></tr> |
---|
103 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fe45918d01b24059e4173b7bf939f91"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_double" ref="6fe45918d01b24059e4173b7bf939f91" args="(QLLR l) const " --> |
---|
104 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#6fe45918d01b24059e4173b7bf939f91">to_double</a> (<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> l) const </td></tr> |
---|
105 | |
---|
106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert an LLR type to a "real" LLR. <br></td></tr> |
---|
107 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8dcd37da88e95bfc12c415d3395bd631"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_double" ref="8dcd37da88e95bfc12c415d3395bd631" args="(const QLLRvec &l) const " --> |
---|
108 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#8dcd37da88e95bfc12c415d3395bd631">to_double</a> (const <a class="el" href="classitpp_1_1Vec.html">QLLRvec</a> &l) const </td></tr> |
---|
109 | |
---|
110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a vector of LLR types to a "real" LLR. <br></td></tr> |
---|
111 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="956edd24063012beaade36d445c17cee"></a><!-- doxytag: member="itpp::LLR_calc_unit::to_double" ref="956edd24063012beaade36d445c17cee" args="(const QLLRmat &l) const " --> |
---|
112 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#956edd24063012beaade36d445c17cee">to_double</a> (const <a class="el" href="classitpp_1_1Mat.html">QLLRmat</a> &l) const </td></tr> |
---|
113 | |
---|
114 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a matrix of LLR types to a "real" LLR. <br></td></tr> |
---|
115 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#217d9cbc322bba5055e1b9098a199e16">jaclog</a> (<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> a, <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> b) const </td></tr> |
---|
116 | |
---|
117 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Jacobian logarithm. <a href="#217d9cbc322bba5055e1b9098a199e16"></a><br></td></tr> |
---|
118 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#5dd699781fbbbc31f7e641ddca2ba467">Boxplus</a> (<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> a, <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> b) const </td></tr> |
---|
119 | |
---|
120 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Hagenauer's "Boxplus" operator. <a href="#5dd699781fbbbc31f7e641ddca2ba467"></a><br></td></tr> |
---|
121 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#7ec4463a33fc8500fbf1bd9c142a3bcb">logexp</a> (<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> x) const </td></tr> |
---|
122 | |
---|
123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logexp operator. <a href="#7ec4463a33fc8500fbf1bd9c142a3bcb"></a><br></td></tr> |
---|
124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="550e6a46b64e4df849c719ca3c0f038b"></a><!-- doxytag: member="itpp::LLR_calc_unit::get_Dint" ref="550e6a46b64e4df849c719ca3c0f038b" args="()" --> |
---|
125 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#550e6a46b64e4df849c719ca3c0f038b">get_Dint</a> ()</td></tr> |
---|
126 | |
---|
127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the table resolution values. <br></td></tr> |
---|
128 | <tr><td colspan="2"><br><h2>Friends</h2></td></tr> |
---|
129 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0d7b62e5b9ea86e4b7450dffd7f400f"></a><!-- doxytag: member="itpp::LLR_calc_unit::operator<<" ref="e0d7b62e5b9ea86e4b7450dffd7f400f" args="(std::ostream &os, const LLR_calc_unit &l)" --> |
---|
130 | std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#e0d7b62e5b9ea86e4b7450dffd7f400f">operator<<</a> (std::ostream &os, const <a class="el" href="classitpp_1_1LLR__calc__unit.html">LLR_calc_unit</a> &l)</td></tr> |
---|
131 | |
---|
132 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Print some properties of the LLR calculation unit in plain text. <br></td></tr> |
---|
133 | <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> |
---|
134 | <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> |
---|
135 | <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef signed int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a></td></tr> |
---|
136 | |
---|
137 | <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classitpp_1_1Vec.html">Vec</a>< <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#fa891d6a6bac8f0294368ce6c85aab30">QLLRvec</a></td></tr> |
---|
138 | |
---|
139 | <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classitpp_1_1Mat.html">Mat</a>< <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#a8108342a0fa77005d7714f27158fa13">QLLRmat</a></td></tr> |
---|
140 | |
---|
141 | <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1LLR__calc__unit.html#ead7f08c87fe73a8c33ab94777fa7374">QLLR_MAX</a> = (std::numeric_limits<<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a>>::max() >> 4)</td></tr> |
---|
142 | |
---|
143 | </table> |
---|
144 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
145 | Log-likelihood algebra calculation unit. |
---|
146 | <p> |
---|
147 | This class contains functions for algebra with log-likelihood ratios (LLRs). The (sole) purpose of this class is to provide numerically efficient functions for turbo and LDPC codes, which rely on certain nonlinear operations on LLRs.<p> |
---|
148 | An LLR for an information bit b is defined according to <p class="formulaDsp"> |
---|
149 | <img class="formulaDsp" alt="\[ L = \log \frac{P(b=0)}{P(b=1)} \]" src="form_246.png"> |
---|
150 | <p> |
---|
151 | and it is in general a real number.<p> |
---|
152 | LLR values are represented via the special type, "quantized LLR" (QLLR). The relation between the quantized representation and the real (floating-point) LLR value is <p class="formulaDsp"> |
---|
153 | <img class="formulaDsp" alt="\[ \mbox{QLLR} = \mbox{round} \left(2^{\mbox{Dint1}}\cdot \mbox{LLR}\right) \]" src="form_247.png"> |
---|
154 | <p> |
---|
155 | The user parameter Dint1 determines the granularity of the quantization, and it can be set arbitrarily. The functions <a class="el" href="classitpp_1_1LLR__calc__unit.html#6fe45918d01b24059e4173b7bf939f91" title="Convert an LLR type to a "real" LLR.">to_double()</a> and <a class="el" href="classitpp_1_1LLR__calc__unit.html#fdc07e6395053a2a9441c8b13cd2d8ad" title="Convert a "real" LLR value to an LLR type.">to_qllr()</a> can be used to perform conversions between the two representations (QLLR to floating-point, and vice versa).<p> |
---|
156 | The class provides functions for the computation of the Jacobian logarithm and Hagenauer's "boxplus" operator. These functions are based on a table-lookup. The resolution of the table is determined by the parameters Dint2 and Dint3. See the class constructor for more detail. When an object of <a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a> is created, corresponding lookup-tables are also generated. The resolution of these tables can be adjusted by providing parameters to the constructor.<p> |
---|
157 | The variable table resolution allows one to study complexity versus accuracy (i.e., how different table resolutions would degrade performance) to some extent. Yet the main purpose of the QLLR representation is to provide a tool for writing efficient simulation code, rather than to provide for bit-level (fixed-point) simulations. For bit-level simulations, a true fixed point representation of LLRs would be preferred/required. With the default setting of the table parameters, using the QLLR type is practically as accurate (but much faster) as using "double" to represent LLRs. Decoder implementations may then provide functions using QLLR, fixed-point, or double (for compatibility reasons) representations of LLR values.<p> |
---|
158 | Note: the QLLR type does not check that the correct quantization level is used. I.e., in theory it would be possible to add two QLLR types with different quantization (Dint) parameters. This is intentionally implemented this way to achieve maximum runtime efficiency. <hr><h2>Constructor & Destructor Documentation</h2> |
---|
159 | <a class="anchor" name="b3e59cb704e3a20d4060f968b9360f15"></a><!-- doxytag: member="itpp::LLR_calc_unit::LLR_calc_unit" ref="b3e59cb704e3a20d4060f968b9360f15" args="(short int Dint1, short int Dint2, short int Dint3)" --> |
---|
160 | <div class="memitem"> |
---|
161 | <div class="memproto"> |
---|
162 | <table class="memname"> |
---|
163 | <tr> |
---|
164 | <td class="memname">itpp::LLR_calc_unit::LLR_calc_unit </td> |
---|
165 | <td>(</td> |
---|
166 | <td class="paramtype">short int </td> |
---|
167 | <td class="paramname"> <em>Dint1</em>, </td> |
---|
168 | </tr> |
---|
169 | <tr> |
---|
170 | <td class="paramkey"></td> |
---|
171 | <td></td> |
---|
172 | <td class="paramtype">short int </td> |
---|
173 | <td class="paramname"> <em>Dint2</em>, </td> |
---|
174 | </tr> |
---|
175 | <tr> |
---|
176 | <td class="paramkey"></td> |
---|
177 | <td></td> |
---|
178 | <td class="paramtype">short int </td> |
---|
179 | <td class="paramname"> <em>Dint3</em></td><td> </td> |
---|
180 | </tr> |
---|
181 | <tr> |
---|
182 | <td></td> |
---|
183 | <td>)</td> |
---|
184 | <td></td><td></td><td></td> |
---|
185 | </tr> |
---|
186 | </table> |
---|
187 | </div> |
---|
188 | <div class="memdoc"> |
---|
189 | |
---|
190 | <p> |
---|
191 | Constructor, using a specific table resolution. |
---|
192 | <p> |
---|
193 | See <a class="el" href="classitpp_1_1LLR__calc__unit.html#531b0a4eca593e439a39ba9de42ee68c" title="Set the quantization and table parameters.">init_llr_tables()</a> for more details on the parameters. |
---|
194 | <p>References <a class="el" href="llr_8cpp-source.html#l00055">init_llr_tables()</a>.</p> |
---|
195 | |
---|
196 | </div> |
---|
197 | </div><p> |
---|
198 | <hr><h2>Member Function Documentation</h2> |
---|
199 | <a class="anchor" name="5dd699781fbbbc31f7e641ddca2ba467"></a><!-- doxytag: member="itpp::LLR_calc_unit::Boxplus" ref="5dd699781fbbbc31f7e641ddca2ba467" args="(QLLR a, QLLR b) const " --> |
---|
200 | <div class="memitem"> |
---|
201 | <div class="memproto"> |
---|
202 | <table class="memname"> |
---|
203 | <tr> |
---|
204 | <td class="memname"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> itpp::LLR_calc_unit::Boxplus </td> |
---|
205 | <td>(</td> |
---|
206 | <td class="paramtype"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td> |
---|
207 | <td class="paramname"> <em>a</em>, </td> |
---|
208 | </tr> |
---|
209 | <tr> |
---|
210 | <td class="paramkey"></td> |
---|
211 | <td></td> |
---|
212 | <td class="paramtype"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td> |
---|
213 | <td class="paramname"> <em>b</em></td><td> </td> |
---|
214 | </tr> |
---|
215 | <tr> |
---|
216 | <td></td> |
---|
217 | <td>)</td> |
---|
218 | <td></td><td></td><td> const</td> |
---|
219 | </tr> |
---|
220 | </table> |
---|
221 | </div> |
---|
222 | <div class="memdoc"> |
---|
223 | |
---|
224 | <p> |
---|
225 | Hagenauer's "Boxplus" operator. |
---|
226 | <p> |
---|
227 | This function computes: <p class="formulaDsp"> |
---|
228 | <img class="formulaDsp" alt="\[ \mbox{sign}(a) * \mbox{sign}(b) * \mbox{min}(|a|,|b|) + f(|a+b|) - f(|a-b|) \]" src="form_250.png"> |
---|
229 | <p> |
---|
230 | where <p class="formulaDsp"> |
---|
231 | <img class="formulaDsp" alt="\[ f(x) = \log(1+\exp(-x)) \]" src="form_251.png"> |
---|
232 | <p> |
---|
233 | |
---|
234 | <p>References <a class="el" href="itassert_8h-source.html#l00163">it_info_debug</a>, <a class="el" href="llr_8h-source.html#l00251">logexp()</a>, and <a class="el" href="llr_8h-source.html#l00060">QLLR_MAX</a>.</p> |
---|
235 | |
---|
236 | <p>Referenced by <a class="el" href="ldpc_8cpp-source.html#l01386">itpp::LDPC_Code::bp_decode()</a>.</p> |
---|
237 | |
---|
238 | </div> |
---|
239 | </div><p> |
---|
240 | <a class="anchor" name="531b0a4eca593e439a39ba9de42ee68c"></a><!-- doxytag: member="itpp::LLR_calc_unit::init_llr_tables" ref="531b0a4eca593e439a39ba9de42ee68c" args="(short int Dint1=12, short int Dint2=300, short int Dint3=7)" --> |
---|
241 | <div class="memitem"> |
---|
242 | <div class="memproto"> |
---|
243 | <table class="memname"> |
---|
244 | <tr> |
---|
245 | <td class="memname">void itpp::LLR_calc_unit::init_llr_tables </td> |
---|
246 | <td>(</td> |
---|
247 | <td class="paramtype">short int </td> |
---|
248 | <td class="paramname"> <em>Dint1</em> = <code>12</code>, </td> |
---|
249 | </tr> |
---|
250 | <tr> |
---|
251 | <td class="paramkey"></td> |
---|
252 | <td></td> |
---|
253 | <td class="paramtype">short int </td> |
---|
254 | <td class="paramname"> <em>Dint2</em> = <code>300</code>, </td> |
---|
255 | </tr> |
---|
256 | <tr> |
---|
257 | <td class="paramkey"></td> |
---|
258 | <td></td> |
---|
259 | <td class="paramtype">short int </td> |
---|
260 | <td class="paramname"> <em>Dint3</em> = <code>7</code></td><td> </td> |
---|
261 | </tr> |
---|
262 | <tr> |
---|
263 | <td></td> |
---|
264 | <td>)</td> |
---|
265 | <td></td><td></td><td></td> |
---|
266 | </tr> |
---|
267 | </table> |
---|
268 | </div> |
---|
269 | <div class="memdoc"> |
---|
270 | |
---|
271 | <p> |
---|
272 | Set the quantization and table parameters. |
---|
273 | <p> |
---|
274 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
275 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
276 | <tr><td valign="top"></td><td valign="top"><em>Dint1</em> </td><td>Determines the relation between LLR represented as real number and as integer. The relation is <p class="formulaDsp"> |
---|
277 | <img class="formulaDsp" alt="\[ \mbox{QLLR} = \mbox{round} \left(2^{\mbox{Dint1}}\cdot \mbox{LLR}\right) \]" src="form_247.png"> |
---|
278 | <p> |
---|
279 | </td></tr> |
---|
280 | <tr><td valign="top"></td><td valign="top"><em>Dint2</em> </td><td>Number of entries in the table. If this is zero, then logmap becomes logmax.</td></tr> |
---|
281 | <tr><td valign="top"></td><td valign="top"><em>Dint3</em> </td><td>Determines the table resolution. The spacing between each entry is <p class="formulaDsp"> |
---|
282 | <img class="formulaDsp" alt="\[ 2^{-(Dint1-Dint3)} \]" src="form_248.png"> |
---|
283 | <p> |
---|
284 | </td></tr> |
---|
285 | </table> |
---|
286 | </dl> |
---|
287 | The default parameter values are chosen to give a performance practically indistinguishable from that of using floating point calculations.<p> |
---|
288 | Example: (recommended settings with "exact" computation via high resolution lookup table) <div class="fragment"><pre class="fragment"> <a class="code" href="classitpp_1_1LLR__calc__unit.html#d9a5a2abb2ef8b62266207e67f2a0ff4" title="Constructor, using the default table resolution.">LLR_calc_unit</a> lcalc(12, 300, 7); |
---|
289 | </pre></div><p> |
---|
290 | Example: (recommended settings with logmax, i.e. no table lookup) <div class="fragment"><pre class="fragment"> <a class="code" href="classitpp_1_1LLR__calc__unit.html#d9a5a2abb2ef8b62266207e67f2a0ff4" title="Constructor, using the default table resolution.">LLR_calc_unit</a> lcalc(12, 0, 7); |
---|
291 | </pre></div> |
---|
292 | <p>Referenced by <a class="el" href="llr_8cpp-source.html#l00036">LLR_calc_unit()</a>.</p> |
---|
293 | |
---|
294 | </div> |
---|
295 | </div><p> |
---|
296 | <a class="anchor" name="217d9cbc322bba5055e1b9098a199e16"></a><!-- doxytag: member="itpp::LLR_calc_unit::jaclog" ref="217d9cbc322bba5055e1b9098a199e16" args="(QLLR a, QLLR b) const " --> |
---|
297 | <div class="memitem"> |
---|
298 | <div class="memproto"> |
---|
299 | <table class="memname"> |
---|
300 | <tr> |
---|
301 | <td class="memname"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> itpp::LLR_calc_unit::jaclog </td> |
---|
302 | <td>(</td> |
---|
303 | <td class="paramtype"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td> |
---|
304 | <td class="paramname"> <em>a</em>, </td> |
---|
305 | </tr> |
---|
306 | <tr> |
---|
307 | <td class="paramkey"></td> |
---|
308 | <td></td> |
---|
309 | <td class="paramtype"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td> |
---|
310 | <td class="paramname"> <em>b</em></td><td> </td> |
---|
311 | </tr> |
---|
312 | <tr> |
---|
313 | <td></td> |
---|
314 | <td>)</td> |
---|
315 | <td></td><td></td><td> const<code> [inline]</code></td> |
---|
316 | </tr> |
---|
317 | </table> |
---|
318 | </div> |
---|
319 | <div class="memdoc"> |
---|
320 | |
---|
321 | <p> |
---|
322 | Jacobian logarithm. |
---|
323 | <p> |
---|
324 | This function computes <p class="formulaDsp"> |
---|
325 | <img class="formulaDsp" alt="\[ \log(\exp(a)+\exp(b)) \]" src="form_249.png"> |
---|
326 | <p> |
---|
327 | |
---|
328 | <p>References <a class="el" href="llr_8h-source.html#l00251">logexp()</a>, and <a class="el" href="llr_8h-source.html#l00060">QLLR_MAX</a>.</p> |
---|
329 | |
---|
330 | <p>Referenced by <a class="el" href="rec__syst__conv__code_8cpp-source.html#l00517">itpp::Rec_Syst_Conv_Code::log_decode()</a>, <a class="el" href="rec__syst__conv__code_8cpp-source.html#l00628">itpp::Rec_Syst_Conv_Code::log_decode_n2()</a>, <a class="el" href="modulator__nd_8cpp-source.html#l00043">itpp::Modulator_ND::probabilities()</a>, and <a class="el" href="modulator__nd_8cpp-source.html#l00067">itpp::Modulator_ND::update_LLR()</a>.</p> |
---|
331 | |
---|
332 | </div> |
---|
333 | </div><p> |
---|
334 | <a class="anchor" name="7ec4463a33fc8500fbf1bd9c142a3bcb"></a><!-- doxytag: member="itpp::LLR_calc_unit::logexp" ref="7ec4463a33fc8500fbf1bd9c142a3bcb" args="(QLLR x) const " --> |
---|
335 | <div class="memitem"> |
---|
336 | <div class="memproto"> |
---|
337 | <table class="memname"> |
---|
338 | <tr> |
---|
339 | <td class="memname"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> itpp::LLR_calc_unit::logexp </td> |
---|
340 | <td>(</td> |
---|
341 | <td class="paramtype"><a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> </td> |
---|
342 | <td class="paramname"> <em>x</em> </td> |
---|
343 | <td> ) </td> |
---|
344 | <td> const<code> [inline]</code></td> |
---|
345 | </tr> |
---|
346 | </table> |
---|
347 | </div> |
---|
348 | <div class="memdoc"> |
---|
349 | |
---|
350 | <p> |
---|
351 | Logexp operator. |
---|
352 | <p> |
---|
353 | This function computes <p class="formulaDsp"> |
---|
354 | <img class="formulaDsp" alt="\[ f(x) = \log(1+\exp(-x)) \]" src="form_251.png"> |
---|
355 | <p> |
---|
356 | |
---|
357 | <p>References <a class="el" href="itassert_8h-source.html#l00107">it_assert_debug</a>.</p> |
---|
358 | |
---|
359 | <p>Referenced by <a class="el" href="llr_8cpp-source.html#l00123">Boxplus()</a>, and <a class="el" href="llr_8h-source.html#l00270">jaclog()</a>.</p> |
---|
360 | |
---|
361 | </div> |
---|
362 | </div><p> |
---|
363 | <hr><h2>Friends And Related Function Documentation</h2> |
---|
364 | <a class="anchor" name="09afad8f68db048f87a252605c40a7b9"></a><!-- doxytag: member="itpp::LLR_calc_unit::QLLR" ref="09afad8f68db048f87a252605c40a7b9" args="" --> |
---|
365 | <div class="memitem"> |
---|
366 | <div class="memproto"> |
---|
367 | <table class="memname"> |
---|
368 | <tr> |
---|
369 | <td class="memname">typedef signed int <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a><code> [related]</code> </td> |
---|
370 | </tr> |
---|
371 | </table> |
---|
372 | </div> |
---|
373 | <div class="memdoc"> |
---|
374 | |
---|
375 | <p> |
---|
376 | The quantized log-likelihood ratio (QLLR) representation, scalar form. See <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code>. |
---|
377 | </div> |
---|
378 | </div><p> |
---|
379 | <a class="anchor" name="ead7f08c87fe73a8c33ab94777fa7374"></a><!-- doxytag: member="itpp::LLR_calc_unit::QLLR_MAX" ref="ead7f08c87fe73a8c33ab94777fa7374" args="" --> |
---|
380 | <div class="memitem"> |
---|
381 | <div class="memproto"> |
---|
382 | <table class="memname"> |
---|
383 | <tr> |
---|
384 | <td class="memname">const <a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a> <a class="el" href="classitpp_1_1LLR__calc__unit.html#ead7f08c87fe73a8c33ab94777fa7374">QLLR_MAX</a> = (std::numeric_limits<<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a>>::max() >> 4)<code> [related]</code> </td> |
---|
385 | </tr> |
---|
386 | </table> |
---|
387 | </div> |
---|
388 | <div class="memdoc"> |
---|
389 | |
---|
390 | <p> |
---|
391 | The largest possible QLLR value |
---|
392 | <p>Referenced by <a class="el" href="llr_8cpp-source.html#l00123">Boxplus()</a>, <a class="el" href="llr_8h-source.html#l00270">jaclog()</a>, and <a class="el" href="llr_8h-source.html#l00235">to_qllr()</a>.</p> |
---|
393 | |
---|
394 | </div> |
---|
395 | </div><p> |
---|
396 | <a class="anchor" name="a8108342a0fa77005d7714f27158fa13"></a><!-- doxytag: member="itpp::LLR_calc_unit::QLLRmat" ref="a8108342a0fa77005d7714f27158fa13" args="" --> |
---|
397 | <div class="memitem"> |
---|
398 | <div class="memproto"> |
---|
399 | <table class="memname"> |
---|
400 | <tr> |
---|
401 | <td class="memname">typedef <a class="el" href="classitpp_1_1Mat.html">Mat</a><<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a>> <a class="el" href="classitpp_1_1Mat.html">QLLRmat</a><code> [related]</code> </td> |
---|
402 | </tr> |
---|
403 | </table> |
---|
404 | </div> |
---|
405 | <div class="memdoc"> |
---|
406 | |
---|
407 | <p> |
---|
408 | The quantized log-likelihood ratio (QLLR) representation, matrix form. See <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code>. |
---|
409 | </div> |
---|
410 | </div><p> |
---|
411 | <a class="anchor" name="fa891d6a6bac8f0294368ce6c85aab30"></a><!-- doxytag: member="itpp::LLR_calc_unit::QLLRvec" ref="fa891d6a6bac8f0294368ce6c85aab30" args="" --> |
---|
412 | <div class="memitem"> |
---|
413 | <div class="memproto"> |
---|
414 | <table class="memname"> |
---|
415 | <tr> |
---|
416 | <td class="memname">typedef <a class="el" href="classitpp_1_1Vec.html">Vec</a><<a class="el" href="classitpp_1_1LLR__calc__unit.html#09afad8f68db048f87a252605c40a7b9">QLLR</a>> <a class="el" href="classitpp_1_1Vec.html">QLLRvec</a><code> [related]</code> </td> |
---|
417 | </tr> |
---|
418 | </table> |
---|
419 | </div> |
---|
420 | <div class="memdoc"> |
---|
421 | |
---|
422 | <p> |
---|
423 | The quantized log-likelihood ratio (QLLR) representation, vector form. See <code><a class="el" href="classitpp_1_1LLR__calc__unit.html" title="Log-likelihood algebra calculation unit.">LLR_calc_unit</a></code>. |
---|
424 | </div> |
---|
425 | </div><p> |
---|
426 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
427 | <li><a class="el" href="llr_8h-source.html">llr.h</a><li><a class="el" href="llr_8cpp.html">llr.cpp</a></ul> |
---|
428 | </div> |
---|
429 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
430 | <a href="http://www.doxygen.org/index.html"> |
---|
431 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
432 | </body> |
---|
433 | </html> |
---|