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: fix_base.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
63 | </ul> |
---|
64 | </div> |
---|
65 | <h1>fix_base.h</h1><a href="fix__base_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef FIX_BASE_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define FIX_BASE_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="itcompat_8h.html" title="IT++ compatibility types and functions.">itpp/base/itcompat.h</a>></span> |
---|
70 | <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="misc__stat_8h.html" title="Miscellaneous statistics functions and classes - header file.">itpp/stat/misc_stat.h</a>></span> |
---|
71 | <a name="l00034"></a>00034 |
---|
72 | <a name="l00035"></a>00035 |
---|
73 | <a name="l00036"></a>00036 <span class="keyword">namespace </span>itpp |
---|
74 | <a name="l00037"></a>00037 { |
---|
75 | <a name="l00038"></a>00038 |
---|
76 | <a name="l00880"></a>00880 |
---|
77 | <a name="l00881"></a>00881 |
---|
78 | <a name="l00883"></a><a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3">00883</a> <span class="keyword">typedef</span> int64_t <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a>; |
---|
79 | <a name="l00885"></a><a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c">00885</a> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c" title="Max word length.">MAX_WORDLEN</a> = 64; |
---|
80 | <a name="l00886"></a>00886 |
---|
81 | <a name="l00888"></a><a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318">00888</a> <span class="keyword">const</span> uint64_t <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[64] = { |
---|
82 | <a name="l00889"></a>00889 uint64_t(1), uint64_t(1) << 1, uint64_t(1) << 2, uint64_t(1) << 3, uint64_t(1) << 4, |
---|
83 | <a name="l00890"></a>00890 uint64_t(1) << 5, uint64_t(1) << 6, uint64_t(1) << 7, uint64_t(1) << 8, uint64_t(1) << 9, |
---|
84 | <a name="l00891"></a>00891 uint64_t(1) << 10, uint64_t(1) << 11, uint64_t(1) << 12, uint64_t(1) << 13, uint64_t(1) << 14, |
---|
85 | <a name="l00892"></a>00892 uint64_t(1) << 15, uint64_t(1) << 16, uint64_t(1) << 17, uint64_t(1) << 18, uint64_t(1) << 19, |
---|
86 | <a name="l00893"></a>00893 uint64_t(1) << 20, uint64_t(1) << 21, uint64_t(1) << 22, uint64_t(1) << 23, uint64_t(1) << 24, |
---|
87 | <a name="l00894"></a>00894 uint64_t(1) << 25, uint64_t(1) << 26, uint64_t(1) << 27, uint64_t(1) << 28, uint64_t(1) << 29, |
---|
88 | <a name="l00895"></a>00895 uint64_t(1) << 30, uint64_t(1) << 31, uint64_t(1) << 32, uint64_t(1) << 33, uint64_t(1) << 34, |
---|
89 | <a name="l00896"></a>00896 uint64_t(1) << 35, uint64_t(1) << 36, uint64_t(1) << 37, uint64_t(1) << 38, uint64_t(1) << 39, |
---|
90 | <a name="l00897"></a>00897 uint64_t(1) << 40, uint64_t(1) << 41, uint64_t(1) << 42, uint64_t(1) << 43, uint64_t(1) << 44, |
---|
91 | <a name="l00898"></a>00898 uint64_t(1) << 45, uint64_t(1) << 46, uint64_t(1) << 47, uint64_t(1) << 48, uint64_t(1) << 49, |
---|
92 | <a name="l00899"></a>00899 uint64_t(1) << 50, uint64_t(1) << 51, uint64_t(1) << 52, uint64_t(1) << 53, uint64_t(1) << 54, |
---|
93 | <a name="l00900"></a>00900 uint64_t(1) << 55, uint64_t(1) << 56, uint64_t(1) << 57, uint64_t(1) << 58, uint64_t(1) << 59, |
---|
94 | <a name="l00901"></a>00901 uint64_t(1) << 60, uint64_t(1) << 61, uint64_t(1) << 62, uint64_t(1) << 63 |
---|
95 | <a name="l00902"></a>00902 }; |
---|
96 | <a name="l00903"></a>00903 |
---|
97 | <a name="l00905"></a><a class="code" href="group__fixed.html#g338980796829ae82ef35b6643a31d441">00905</a> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="group__fixed.html#g338980796829ae82ef35b6643a31d441" title="Table for fast multiplication by 2^(n-64).">DOUBLE_POW2</a>[128] = { |
---|
98 | <a name="l00906"></a>00906 0.5 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[63], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[63], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[62], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[61], |
---|
99 | <a name="l00907"></a>00907 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[60], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[59], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[58], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[57], |
---|
100 | <a name="l00908"></a>00908 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[56], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[55], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[54], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[53], |
---|
101 | <a name="l00909"></a>00909 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[52], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[51], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[50], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[49], |
---|
102 | <a name="l00910"></a>00910 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[48], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[47], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[46], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[45], |
---|
103 | <a name="l00911"></a>00911 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[44], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[43], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[42], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[41], |
---|
104 | <a name="l00912"></a>00912 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[40], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[39], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[38], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[37], |
---|
105 | <a name="l00913"></a>00913 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[36], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[35], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[34], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[33], |
---|
106 | <a name="l00914"></a>00914 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[32], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[31], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[30], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[29], |
---|
107 | <a name="l00915"></a>00915 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[28], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[27], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[26], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[25], |
---|
108 | <a name="l00916"></a>00916 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[24], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[23], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[22], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[21], |
---|
109 | <a name="l00917"></a>00917 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[20], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[19], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[18], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[17], |
---|
110 | <a name="l00918"></a>00918 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[16], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[15], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[14], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[13], |
---|
111 | <a name="l00919"></a>00919 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[12], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[11], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[10], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[9], |
---|
112 | <a name="l00920"></a>00920 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[8], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[7], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[6], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[5], |
---|
113 | <a name="l00921"></a>00921 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[4], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[3], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[2], 1.0 / <a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[1], |
---|
114 | <a name="l00922"></a>00922 1.0, 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[1], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[2], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[3], |
---|
115 | <a name="l00923"></a>00923 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[4], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[5], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[6], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[7], |
---|
116 | <a name="l00924"></a>00924 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[8], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[9], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[10], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[11], |
---|
117 | <a name="l00925"></a>00925 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[12], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[13], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[14], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[15], |
---|
118 | <a name="l00926"></a>00926 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[16], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[17], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[18], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[19], |
---|
119 | <a name="l00927"></a>00927 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[20], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[21], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[22], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[23], |
---|
120 | <a name="l00928"></a>00928 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[24], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[25], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[26], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[27], |
---|
121 | <a name="l00929"></a>00929 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[28], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[29], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[30], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[31], |
---|
122 | <a name="l00930"></a>00930 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[32], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[33], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[34], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[35], |
---|
123 | <a name="l00931"></a>00931 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[36], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[37], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[38], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[39], |
---|
124 | <a name="l00932"></a>00932 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[40], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[41], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[42], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[43], |
---|
125 | <a name="l00933"></a>00933 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[44], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[45], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[46], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[47], |
---|
126 | <a name="l00934"></a>00934 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[48], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[49], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[50], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[51], |
---|
127 | <a name="l00935"></a>00935 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[52], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[53], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[54], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[55], |
---|
128 | <a name="l00936"></a>00936 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[56], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[57], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[58], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[59], |
---|
129 | <a name="l00937"></a>00937 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[60], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[61], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[62], 1.0*<a class="code" href="group__fixed.html#g6c2ab04b8f8e426c8d4fb1d23c756318" title="Table for fast multiplication or division by 2^n.">UINT64_POW2</a>[63] |
---|
130 | <a name="l00938"></a>00938 }; |
---|
131 | <a name="l00939"></a>00939 |
---|
132 | <a name="l00941"></a><a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d">00941</a> <span class="keyword">enum</span> <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> { |
---|
133 | <a name="l00942"></a><a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a">00942</a> <a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a" title="Two&#39;s complement.">TC</a>, |
---|
134 | <a name="l00943"></a><a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450d1d95a58e7c118ad0647ea7003a0117e3">00943</a> <a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450d1d95a58e7c118ad0647ea7003a0117e3" title="Unsigned.">US</a> |
---|
135 | <a name="l00944"></a>00944 }; |
---|
136 | <a name="l00945"></a>00945 |
---|
137 | <a name="l00947"></a><a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d">00947</a> <span class="keyword">enum</span> <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> { |
---|
138 | <a name="l00948"></a><a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d813f45e186a9d13fb81daea4bb065407">00948</a> <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d813f45e186a9d13fb81daea4bb065407" title="Saturation.">SAT</a>, |
---|
139 | <a name="l00949"></a><a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d6770446653ad59cf91cd0772b5ccbea5">00949</a> <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d6770446653ad59cf91cd0772b5ccbea5" title="Saturation to zero (Not implemented).">SAT_ZERO</a>, |
---|
140 | <a name="l00950"></a><a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45de24196c3a35b0922dc4b4a2217e176c8">00950</a> <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45de24196c3a35b0922dc4b4a2217e176c8" title="Symmetrical saturation (Not implemented).">SAT_SYM</a>, |
---|
141 | <a name="l00951"></a><a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b">00951</a> <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b" title="Wrap-around.">WRAP</a>, |
---|
142 | <a name="l00952"></a><a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d9c39a7bb5f71dd0545224571e447b3b5">00952</a> <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45d9c39a7bb5f71dd0545224571e447b3b5" title="Sign magnitued wrap-around (Not implemented).">WRAP_SM</a> |
---|
143 | <a name="l00953"></a>00953 }; |
---|
144 | <a name="l00954"></a>00954 |
---|
145 | <a name="l00956"></a><a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11">00956</a> <span class="keyword">enum</span> <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> { |
---|
146 | <a name="l00957"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110db15b318ce562dba85c264687e9952b">00957</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110db15b318ce562dba85c264687e9952b" title="Rounding to plus infinity.">RND</a>, |
---|
147 | <a name="l00958"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11a03622a4542173bb96b26b254cb2c11b">00958</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11a03622a4542173bb96b26b254cb2c11b" title="Rounding to zero.">RND_ZERO</a>, |
---|
148 | <a name="l00959"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed119f96aea79da0366c6ffb3408b6f1f922">00959</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed119f96aea79da0366c6ffb3408b6f1f922" title="Rounding to minus infinity.">RND_MIN_INF</a>, |
---|
149 | <a name="l00960"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed1152aa6516a2be1b81a8af609685b023eb">00960</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed1152aa6516a2be1b81a8af609685b023eb" title="Rounding to infinity.">RND_INF</a>, |
---|
150 | <a name="l00961"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed119498ed77d69cfb8ead939d8f546d80ed">00961</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed119498ed77d69cfb8ead939d8f546d80ed" title="Convergent rounding with half-way value rounded to even value.">RND_CONV</a>, |
---|
151 | <a name="l00962"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11e7a9a32c4edc1f185a9c278e424a8727">00962</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11e7a9a32c4edc1f185a9c278e424a8727" title="Convergent rounding with half-way value rounded to odd value (not defined in SystemC)...">RND_CONV_ODD</a>, |
---|
152 | <a name="l00963"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1">00963</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1" title="Truncation.">TRN</a>, |
---|
153 | <a name="l00964"></a><a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11085b9673eab1122e25d981d597daad27">00964</a> <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed11085b9673eab1122e25d981d597daad27" title="Truncation to zero.">TRN_ZERO</a> |
---|
154 | <a name="l00965"></a>00965 }; |
---|
155 | <a name="l00966"></a>00966 |
---|
156 | <a name="l00968"></a><a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6">00968</a> <span class="keyword">enum</span> <a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6" title="Output modes.">output_mode</a> { |
---|
157 | <a name="l00969"></a><a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa63dee74675bc68511cbdba29e929b5d2e">00969</a> <a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa63dee74675bc68511cbdba29e929b5d2e" title="Output fixed-point representation only.">OUTPUT_FIX</a>, |
---|
158 | <a name="l00970"></a><a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa650a937efd0d92ee9cc3d2f2c123dfea4">00970</a> <a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa650a937efd0d92ee9cc3d2f2c123dfea4" title="Output fixed-point representation followed by &lt;shift&gt; (default).">OUTPUT_FIX_SHIFT</a>, |
---|
159 | <a name="l00971"></a><a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa648d1c123d8954d51dd438f6e052f7096">00971</a> <a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa648d1c123d8954d51dd438f6e052f7096" title="Output floating-point value.">OUTPUT_FLOAT</a>, |
---|
160 | <a name="l00972"></a><a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa6d5a3fdf98d9a3fc1e0e5810e3811fe67">00972</a> <a class="code" href="group__fixed.html#ggb8f9923897b39fd81e902f3874d8cfa6d5a3fdf98d9a3fc1e0e5810e3811fe67" title="Output floating-point value followed by &lt;&lt;shift.">OUTPUT_FLOAT_SHIFT</a> |
---|
161 | <a name="l00973"></a>00973 }; |
---|
162 | <a name="l00974"></a>00974 |
---|
163 | <a name="l00980"></a><a class="code" href="classitpp_1_1Fix__Base.html">00980</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a> |
---|
164 | <a name="l00981"></a>00981 { |
---|
165 | <a name="l00982"></a>00982 <span class="keyword">public</span>: |
---|
166 | <a name="l00984"></a><a class="code" href="classitpp_1_1Fix__Base.html#1f537e7615fcf7fe1363bfc0e6f833b6">00984</a> <span class="keyword">explicit</span> <a class="code" href="classitpp_1_1Fix__Base.html#1f537e7615fcf7fe1363bfc0e6f833b6" title="Default constructor.">Fix_Base</a>(<span class="keywordtype">int</span> s = 0, <span class="keywordtype">int</span> w = <a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c" title="Max word length.">MAX_WORDLEN</a>, <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> e = <a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a" title="Two&#39;s complement.">TC</a>, <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> o = <a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b" title="Wrap-around.">WRAP</a>, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q = <a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1" title="Truncation.">TRN</a>, <a class="code" href="classitpp_1_1Stat.html" title="A class for sampling a signal and calculating statistics.">Stat</a> *ptr = 0) |
---|
167 | <a name="l00985"></a>00985 : <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>(s), <a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6" title="Word length.">wordlen</a>(w), <a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83" title="Sign encoding mode.">emode</a>(e), <a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c" title="Overflow mode.">omode</a>(o), <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>(q), <a class="code" href="classitpp_1_1Fix__Base.html#a23b1ecd00cd0f0c8fa9b3b5c669a93d" title="Pointer to statistics object.">stat_ptr</a>(ptr) {<a class="code" href="classitpp_1_1Fix__Base.html#8eddb36f30ace96ad69835eb4f821deb" title="Calculate help variables min, max and n_unused_bits.">init</a>();} |
---|
168 | <a name="l00987"></a><a class="code" href="classitpp_1_1Fix__Base.html#fc987db381878a8eed280cba934efc62">00987</a> <a class="code" href="classitpp_1_1Fix__Base.html#1f537e7615fcf7fe1363bfc0e6f833b6" title="Default constructor.">Fix_Base</a>(<span class="keyword">const</span> <a class="code" href="classitpp_1_1Fix__Base.html" title="Base class for fixed-point data types.">Fix_Base</a> &x) |
---|
169 | <a name="l00988"></a>00988 : <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>(x.<a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>), <a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6" title="Word length.">wordlen</a>(<a class="code" href="group__fixed.html#g16660ef1accee4eb3c95d2807c0d7c9c" title="Max word length.">MAX_WORDLEN</a>), <a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83" title="Sign encoding mode.">emode</a>(<a class="code" href="group__fixed.html#gg3a204def662e60bf9bb54d27db09450df4bddf5c0c77795974633939360e6e4a" title="Two&#39;s complement.">TC</a>), <a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c" title="Overflow mode.">omode</a>(<a class="code" href="group__fixed.html#gg18d0ad4d7280177b761737a7b8b5c45da7ea797d8579a3e2dc82f792e16e946b" title="Wrap-around.">WRAP</a>), <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>(<a class="code" href="group__fixed.html#gga644362f0b3d795ce8521326e20fed110566af00cff42134b7f719254d07bec1" title="Truncation.">TRN</a>), <a class="code" href="classitpp_1_1Fix__Base.html#a23b1ecd00cd0f0c8fa9b3b5c669a93d" title="Pointer to statistics object.">stat_ptr</a>(0) {<a class="code" href="classitpp_1_1Fix__Base.html#8eddb36f30ace96ad69835eb4f821deb" title="Calculate help variables min, max and n_unused_bits.">init</a>();} |
---|
170 | <a name="l00990"></a><a class="code" href="classitpp_1_1Fix__Base.html#2ba0e0c2c78771eb4edfa8aaeae1c645">00990</a> <span class="keyword">virtual</span> <a class="code" href="classitpp_1_1Fix__Base.html#2ba0e0c2c78771eb4edfa8aaeae1c645" title="Destructor.">~Fix_Base</a>() {} |
---|
171 | <a name="l00991"></a>00991 |
---|
172 | <a name="l00993"></a><a class="code" href="classitpp_1_1Fix__Base.html#7a05413f5e542cdd1b735df84a49a9d7">00993</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix__Base.html#7a05413f5e542cdd1b735df84a49a9d7" title="Set shift (without shifting).">set_shift</a>(<span class="keywordtype">int</span> s) {<a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a> = s;} |
---|
173 | <a name="l00995"></a><a class="code" href="classitpp_1_1Fix__Base.html#1b6e783a90a7d248be0fa88f0a811846">00995</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix__Base.html#1b6e783a90a7d248be0fa88f0a811846" title="Set output mode to OUTPUT_FIX, OUTPUT_FIX_SHIFT, OUTPUT_FLOAT or OUTPUT_FLOAT_SHIFT...">set_output_mode</a>(<a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6" title="Output modes.">output_mode</a> o) {outputmode = o;} |
---|
174 | <a name="l00997"></a>00997 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix__Base.html#1b6e783a90a7d248be0fa88f0a811846" title="Set output mode to OUTPUT_FIX, OUTPUT_FIX_SHIFT, OUTPUT_FLOAT or OUTPUT_FLOAT_SHIFT...">set_output_mode</a>(std::string o); |
---|
175 | <a name="l00998"></a>00998 |
---|
176 | <a name="l01000"></a><a class="code" href="classitpp_1_1Fix__Base.html#e1224ef62f15c1dcfddc2248697f554a">01000</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fix__Base.html#e1224ef62f15c1dcfddc2248697f554a" title="Get shift.">get_shift</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>;} |
---|
177 | <a name="l01002"></a><a class="code" href="classitpp_1_1Fix__Base.html#b74c044914a82a3ebe62d22b63a17443">01002</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fix__Base.html#b74c044914a82a3ebe62d22b63a17443" title="Get word length.">get_wordlen</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6" title="Word length.">wordlen</a>;} |
---|
178 | <a name="l01004"></a><a class="code" href="classitpp_1_1Fix__Base.html#8386a40c4e89c5e168f842ed0110d350">01004</a> <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#8386a40c4e89c5e168f842ed0110d350" title="Get sign encoding mode.">get_e_mode</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83" title="Sign encoding mode.">emode</a>;} |
---|
179 | <a name="l01006"></a><a class="code" href="classitpp_1_1Fix__Base.html#09c41cd48dcebfa5f81ad6c25f598efc">01006</a> <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#09c41cd48dcebfa5f81ad6c25f598efc" title="Get overflow mode.">get_o_mode</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c" title="Overflow mode.">omode</a>;} |
---|
180 | <a name="l01008"></a><a class="code" href="classitpp_1_1Fix__Base.html#3002313e41418c3bbe811eada7c2e130">01008</a> <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#3002313e41418c3bbe811eada7c2e130" title="Get quantization mode.">get_q_mode</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>;} |
---|
181 | <a name="l01010"></a><a class="code" href="classitpp_1_1Fix__Base.html#a2da77fa593c07c810502e1934c44f73">01010</a> <a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6" title="Output modes.">output_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#a2da77fa593c07c810502e1934c44f73" title="Get output mode.">get_output_mode</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> outputmode;} |
---|
182 | <a name="l01012"></a><a class="code" href="classitpp_1_1Fix__Base.html#e5d07261c4ebc2dcbedb939c2330bb6e">01012</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#e5d07261c4ebc2dcbedb939c2330bb6e" title="Get maximum value of data representation.">get_max</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#a40800c298b67fddd475675d39b5c073" title="Maximum allowed value (help variable to speed up calculations).">max</a>;} |
---|
183 | <a name="l01014"></a><a class="code" href="classitpp_1_1Fix__Base.html#d5081fe8e1b1efc5ac63fe28bf021429">01014</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#d5081fe8e1b1efc5ac63fe28bf021429" title="Get minimum value of data representation.">get_min</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#8be9255ceb6b64a27d8676a5ad0538b5" title="Minimum allowed value (help variable to speed up calculations).">min</a>;} |
---|
184 | <a name="l01016"></a>01016 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix__Base.html#830685e55e4442dc20b6e099fc6bdd3d" title="Print restrictions.">print</a>() <span class="keyword">const</span>; |
---|
185 | <a name="l01017"></a>01017 |
---|
186 | <a name="l01018"></a>01018 <span class="keyword">protected</span>: |
---|
187 | <a name="l01020"></a><a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a">01020</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fix__Base.html#c42e876a20028d8c7538d6f1d4754d6a" title="Accumulated bitshift (positive means left-shifted, negative means right-shifted)...">shift</a>; |
---|
188 | <a name="l01022"></a><a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6">01022</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fix__Base.html#4872b2d730a546e017a75006a99580a6" title="Word length.">wordlen</a>; |
---|
189 | <a name="l01024"></a><a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83">01024</a> <a class="code" href="group__fixed.html#g3a204def662e60bf9bb54d27db09450d" title="Sign encoding modes (aligned with SystemC).">e_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#9ee6bb0d7811e0ec284c19d6497b0b83" title="Sign encoding mode.">emode</a>; |
---|
190 | <a name="l01026"></a><a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c">01026</a> <a class="code" href="group__fixed.html#g18d0ad4d7280177b761737a7b8b5c45d" title="Overflow modes (aligned with SystemC).">o_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#d1b464ea0c3db8fa8c70d9740147ca6c" title="Overflow mode.">omode</a>; |
---|
191 | <a name="l01028"></a><a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a">01028</a> <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>; |
---|
192 | <a name="l01030"></a><a class="code" href="classitpp_1_1Fix__Base.html#a23b1ecd00cd0f0c8fa9b3b5c669a93d">01030</a> <a class="code" href="classitpp_1_1Stat.html" title="A class for sampling a signal and calculating statistics.">Stat</a> *<a class="code" href="classitpp_1_1Fix__Base.html#a23b1ecd00cd0f0c8fa9b3b5c669a93d" title="Pointer to statistics object.">stat_ptr</a>; |
---|
193 | <a name="l01032"></a><a class="code" href="classitpp_1_1Fix__Base.html#8be9255ceb6b64a27d8676a5ad0538b5">01032</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#8be9255ceb6b64a27d8676a5ad0538b5" title="Minimum allowed value (help variable to speed up calculations).">min</a>; |
---|
194 | <a name="l01034"></a><a class="code" href="classitpp_1_1Fix__Base.html#a40800c298b67fddd475675d39b5c073">01034</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#a40800c298b67fddd475675d39b5c073" title="Maximum allowed value (help variable to speed up calculations).">max</a>; |
---|
195 | <a name="l01036"></a><a class="code" href="classitpp_1_1Fix__Base.html#2fb62ee12fe593f6df2afb1a6ac6b43d">01036</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fix__Base.html#2fb62ee12fe593f6df2afb1a6ac6b43d" title="Number of unused (MSB) bits (help variable to speed up calculations).">n_unused_bits</a>; |
---|
196 | <a name="l01037"></a>01037 |
---|
197 | <a name="l01039"></a>01039 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fix__Base.html#8eddb36f30ace96ad69835eb4f821deb" title="Calculate help variables min, max and n_unused_bits.">init</a>(); |
---|
198 | <a name="l01041"></a>01041 <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#d5793faefe33b344b0d74a21ceca81a4" title="Handle overflows using overflow mode omode and make call to statistics object (if...">apply_o_mode</a>(<a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> x) <span class="keyword">const</span>; |
---|
199 | <a name="l01043"></a><a class="code" href="classitpp_1_1Fix__Base.html#a881bc83f4be90b9f7fb7f87b0953f25">01043</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#a881bc83f4be90b9f7fb7f87b0953f25" title="Convert from double to fixrep using shift and quantization mode qmode, then call...">scale_and_apply_modes</a>(<span class="keywordtype">double</span> x)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#a881bc83f4be90b9f7fb7f87b0953f25" title="Convert from double to fixrep using shift and quantization mode qmode, then call...">scale_and_apply_modes</a>(x, <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>);} |
---|
200 | <a name="l01045"></a>01045 <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#a881bc83f4be90b9f7fb7f87b0953f25" title="Convert from double to fixrep using shift and quantization mode qmode, then call...">scale_and_apply_modes</a>(<span class="keywordtype">double</span> x, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q) <span class="keyword">const</span>; |
---|
201 | <a name="l01047"></a><a class="code" href="classitpp_1_1Fix__Base.html#ef3711deb8dbca9ebc800f09bb20e52b">01047</a> <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#ef3711deb8dbca9ebc800f09bb20e52b" title="Right shift n bits using quantization mode qmode and make call to statistics object...">rshift_and_apply_q_mode</a>(<a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> x, <span class="keywordtype">int</span> n)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classitpp_1_1Fix__Base.html#ef3711deb8dbca9ebc800f09bb20e52b" title="Right shift n bits using quantization mode qmode and make call to statistics object...">rshift_and_apply_q_mode</a>(x, n, <a class="code" href="classitpp_1_1Fix__Base.html#cd49b5854e52ef93458f4776e1007b1a" title="Quantization mode.">qmode</a>);} |
---|
202 | <a name="l01049"></a>01049 <a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> <a class="code" href="classitpp_1_1Fix__Base.html#ef3711deb8dbca9ebc800f09bb20e52b" title="Right shift n bits using quantization mode qmode and make call to statistics object...">rshift_and_apply_q_mode</a>(<a class="code" href="group__fixed.html#gf3f12ba9f1a5ce9d50ef18fa3b65b5c3" title="Representation for fixed-point data types.">fixrep</a> x, <span class="keywordtype">int</span> n, <a class="code" href="group__fixed.html#ga644362f0b3d795ce8521326e20fed11" title="Quantization modes (aligned with SystemC).">q_mode</a> q) <span class="keyword">const</span>; |
---|
203 | <a name="l01050"></a>01050 |
---|
204 | <a name="l01051"></a>01051 <span class="keyword">private</span>: |
---|
205 | <a name="l01053"></a>01053 <span class="keyword">static</span> <a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6" title="Output modes.">output_mode</a> outputmode; |
---|
206 | <a name="l01054"></a>01054 }; |
---|
207 | <a name="l01055"></a>01055 |
---|
208 | <a name="l01057"></a><a class="code" href="group__fixed.html#g46e967850e616363aeabd2cda5bcc159">01057</a> <span class="keyword">inline</span> std::ostream &<a class="code" href="group__fixed.html#g46e967850e616363aeabd2cda5bcc159" title="Set output mode.">operator<<</a>(std::ostream &os, <span class="keyword">const</span> <a class="code" href="group__fixed.html#gb8f9923897b39fd81e902f3874d8cfa6" title="Output modes.">output_mode</a> &o) |
---|
209 | <a name="l01058"></a>01058 { |
---|
210 | <a name="l01059"></a>01059 <a class="code" href="classitpp_1_1Fix__Base.html#1b6e783a90a7d248be0fa88f0a811846" title="Set output mode to OUTPUT_FIX, OUTPUT_FIX_SHIFT, OUTPUT_FLOAT or OUTPUT_FLOAT_SHIFT...">Fix_Base::set_output_mode</a>(o); |
---|
211 | <a name="l01060"></a>01060 <span class="keywordflow">return</span> os; |
---|
212 | <a name="l01061"></a>01061 } |
---|
213 | <a name="l01062"></a>01062 |
---|
214 | <a name="l01064"></a>01064 |
---|
215 | <a name="l01065"></a>01065 } <span class="comment">// namespace itpp</span> |
---|
216 | <a name="l01066"></a>01066 |
---|
217 | <a name="l01067"></a>01067 <span class="preprocessor">#endif // #ifndef FIX_BASE_H</span> |
---|
218 | </pre></div></div> |
---|
219 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:11 2009 for mixpp by |
---|
220 | <a href="http://www.doxygen.org/index.html"> |
---|
221 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
222 | </body> |
---|
223 | </html> |
---|