1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.13"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>o-du/phy: common.hpp File Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="search/searchdata.js"></script>
14 <script type="text/javascript" src="search/search.js"></script>
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
20 <table cellspacing="0" cellpadding="0">
22 <tr style="height: 56px;">
23 <td id="projectalign" style="padding-left: 0.5em;">
24 <div id="projectname">o-du/phy
26 <div id="projectbrief">Intel O-RAN/X-RAN Generated Doxygen Documentation</div>
32 <!-- end header part -->
33 <!-- Generated by Doxygen 1.8.13 -->
34 <script type="text/javascript">
35 var searchBox = new SearchBox("searchBox", "search",false,'Search');
37 <script type="text/javascript" src="menudata.js"></script>
38 <script type="text/javascript" src="menu.js"></script>
39 <script type="text/javascript">
41 initMenu('',true,false,'search.php','Search');
42 $(document).ready(function() { init_search(); });
45 <div id="main-nav"></div>
46 <!-- window showing the filter options -->
47 <div id="MSearchSelectWindow"
48 onmouseover="return searchBox.OnSearchSelectShow()"
49 onmouseout="return searchBox.OnSearchSelectHide()"
50 onkeydown="return searchBox.OnSearchSelectKey(event)">
53 <!-- iframe showing the search results (closed by default) -->
54 <div id="MSearchResultsWindow">
55 <iframe src="javascript:void(0)" frameborder="0"
56 name="MSearchResults" id="MSearchResults">
60 <div id="nav-path" class="navpath">
62 <li class="navelem"><a class="el" href="dir_a4c74d6baed87eba72f3b201b7b4b8f2.html">fhi_lib</a></li><li class="navelem"><a class="el" href="dir_babe8eacf738372576863f88f66866a5.html">test</a></li><li class="navelem"><a class="el" href="dir_1bd9561fc3fad99ea06f3a94905f6e7f.html">common</a></li> </ul>
67 <a href="#nested-classes">Data Structures</a> |
68 <a href="#define-members">Macros</a> |
69 <a href="#typedef-members">Typedefs</a> |
70 <a href="#func-members">Functions</a> </div>
71 <div class="headertitle">
72 <div class="title">common.hpp File Reference</div> </div>
74 <div class="contents">
75 <div class="textblock"><code>#include <exception></code><br />
76 <code>#include <random></code><br />
77 <code>#include <string></code><br />
78 <code>#include <utility></code><br />
79 <code>#include <vector></code><br />
80 <code>#include <immintrin.h></code><br />
81 <code>#include <malloc.h></code><br />
82 <code>#include <rte_config.h></code><br />
83 <code>#include <rte_malloc.h></code><br />
84 <code>#include "gtest/gtest.h"</code><br />
85 <code>#include "<a class="el" href="common__typedef__xran_8h_source.html">common_typedef_xran.h</a>"</code><br />
86 <code>#include "<a class="el" href="json_8hpp_source.html">json.hpp</a>"</code><br />
87 </div><div class="textblock"><div class="dynheader">
88 Include dependency graph for common.hpp:</div>
89 <div class="dyncontent">
90 <div class="center"><img src="common_8hpp__incl.png" border="0" usemap="#common_8hpp" alt=""/></div>
91 <map name="common_8hpp" id="common_8hpp">
92 <area shape="rect" id="node12" href="common__typedef__xran_8h.html" title="This header file defines those data type both used by eNB and UE. " alt="" coords="2442,80,2607,107"/>
93 <area shape="rect" id="node16" href="json_8hpp.html" title="json.hpp" alt="" coords="1067,80,1137,107"/>
96 </div><div class="textblock"><div class="dynheader">
97 This graph shows which files directly or indirectly include this file:</div>
98 <div class="dyncontent">
99 <div class="center"><img src="common_8hpp__dep__incl.png" border="0" usemap="#common_8hppdep" alt=""/></div>
100 <map name="common_8hppdep" id="common_8hppdep">
101 <area shape="rect" id="node2" href="common_8cpp.html" title="common.cpp" alt="" coords="43,80,141,107"/>
102 <area shape="rect" id="node3" href="xran__lib__wrap_8hpp.html" title="xran_lib_wrap.hpp" alt="" coords="267,80,394,107"/>
103 <area shape="rect" id="node4" href="xranlib__unit__test__main_8cc.html" title="xranlib_unit_test_main.cc" alt="" coords="5,155,176,181"/>
104 <area shape="rect" id="node5" href="c__plane__tests_8cc.html" title="c_plane_tests.cc" alt="" coords="201,155,322,181"/>
105 <area shape="rect" id="node6" href="chain__tests_8cc.html" title="chain_tests.cc" alt="" coords="347,155,453,181"/>
106 <area shape="rect" id="node7" href="init__sys__functional_8cc.html" title="init_sys_functional.cc" alt="" coords="478,155,626,181"/>
107 <area shape="rect" id="node8" href="compander__functional_8cc.html" title="compander_functional.cc" alt="" coords="521,80,687,107"/>
108 <area shape="rect" id="node9" href="prach__functional_8cc.html" title="prach_functional.cc" alt="" coords="711,80,846,107"/>
109 <area shape="rect" id="node10" href="prach__performance_8cc.html" title="prach_performance.cc" alt="" coords="870,80,1021,107"/>
110 <area shape="rect" id="node11" href="u__plane__functional_8cc.html" title="u_plane_functional.cc" alt="" coords="1045,80,1193,107"/>
111 <area shape="rect" id="node12" href="u__plane__performance_8cc.html" title="u_plane_performance.cc" alt="" coords="1217,80,1381,107"/>
115 <p><a href="common_8hpp_source.html">Go to the source code of this file.</a></p>
116 <table class="memberdecls">
117 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
118 Data Structures</h2></td></tr>
119 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_benchmark_parameters.html">BenchmarkParameters</a></td></tr>
120 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
121 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmissing__config__file__exception.html">missing_config_file_exception</a></td></tr>
122 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
123 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structreading__input__file__exception.html">reading_input_file_exception</a></td></tr>
124 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
125 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_tests.html">KernelTests</a></td></tr>
126 <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
127 </table><table class="memberdecls">
128 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
129 Macros</h2></td></tr>
130 <tr class="memitem:a2c73062f66b2d8c71425ef3bc75ae946"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a2c73062f66b2d8c71425ef3bc75ae946">_BBLIB_DPDK_</a></td></tr>
131 <tr class="separator:a2c73062f66b2d8c71425ef3bc75ae946"><td class="memSeparator" colspan="2"> </td></tr>
132 <tr class="memitem:a9a330f0a8f2feff43f1ccedfaf049e03"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a9a330f0a8f2feff43f1ccedfaf049e03">ASSERT_ARRAY_NEAR</a>(reference, actual, size, precision)   <a class="el" href="common_8hpp.html#aea945be561738ef40c759d617b04255c">assert_array_near</a>(reference, actual, size, precision)</td></tr>
133 <tr class="separator:a9a330f0a8f2feff43f1ccedfaf049e03"><td class="memSeparator" colspan="2"> </td></tr>
134 <tr class="memitem:a1c463cb9865e63120f666efd5a6555b5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a1c463cb9865e63120f666efd5a6555b5">ASSERT_ARRAY_EQ</a>(reference, actual, size)   <a class="el" href="common_8hpp.html#a8f4a12d5e7aa88ef72d3a59f9d0a85f0">assert_array_eq</a>(reference, actual, size)</td></tr>
135 <tr class="separator:a1c463cb9865e63120f666efd5a6555b5"><td class="memSeparator" colspan="2"> </td></tr>
136 <tr class="memitem:aa748fe650bfa70c23834297931a4a2a7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#aa748fe650bfa70c23834297931a4a2a7">ASSERT_AVG_GREATER_COMPLEX</a>(reference, actual, size, precision)   <a class="el" href="common_8hpp.html#a2bbe1c5dcabc83ba7d8485888720da42">assert_avg_greater_complex</a>(reference, actual, size, precision)</td></tr>
137 <tr class="separator:aa748fe650bfa70c23834297931a4a2a7"><td class="memSeparator" colspan="2"> </td></tr>
138 </table><table class="memberdecls">
139 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
140 Typedefs</h2></td></tr>
141 <tr class="memitem:ab701e3ac61a85b337ec5c1abaad6742d"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ab701e3ac61a85b337ec5c1abaad6742d">json</a> = <a class="el" href="namespacenlohmann.html#ae6eede511f01c9f33342044d36a388fa">nlohmann::json</a></td></tr>
142 <tr class="separator:ab701e3ac61a85b337ec5c1abaad6742d"><td class="memSeparator" colspan="2"> </td></tr>
143 </table><table class="memberdecls">
144 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
145 Functions</h2></td></tr>
146 <tr class="memitem:ae39390f41ba978a1f0d79691436c074a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ae39390f41ba978a1f0d79691436c074a">bind_to_cpu</a> (const unsigned cpu)</td></tr>
147 <tr class="memdesc:ae39390f41ba978a1f0d79691436c074a"><td class="mdescLeft"> </td><td class="mdescRight">Attach current process to the selected core. <a href="#ae39390f41ba978a1f0d79691436c074a">More...</a><br /></td></tr>
148 <tr class="separator:ae39390f41ba978a1f0d79691436c074a"><td class="memSeparator" colspan="2"> </td></tr>
149 <tr class="memitem:a8265b710246f9019ff14556adf5eb35a"><td class="memItemLeft" align="right" valign="top">std::pair< double, double > </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a8265b710246f9019ff14556adf5eb35a">calculate_statistics</a> (const std::vector< long > values)</td></tr>
150 <tr class="memdesc:a8265b710246f9019ff14556adf5eb35a"><td class="mdescLeft"> </td><td class="mdescRight">Calculate the mean and variance from the result of the run_benchmark. <a href="#a8265b710246f9019ff14556adf5eb35a">More...</a><br /></td></tr>
151 <tr class="separator:a8265b710246f9019ff14556adf5eb35a"><td class="memSeparator" colspan="2"> </td></tr>
152 <tr class="memitem:a39bf4f7770751080f5b72046abfd01a5"><td class="memItemLeft" align="right" valign="top">std::vector< unsigned > </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a39bf4f7770751080f5b72046abfd01a5">get_sequence</a> (const unsigned number)</td></tr>
153 <tr class="memdesc:a39bf4f7770751080f5b72046abfd01a5"><td class="mdescLeft"> </td><td class="mdescRight">For a given number return sequence of number from 0 to number - 1. <a href="#a39bf4f7770751080f5b72046abfd01a5">More...</a><br /></td></tr>
154 <tr class="separator:a39bf4f7770751080f5b72046abfd01a5"><td class="memSeparator" colspan="2"> </td></tr>
155 <tr class="memitem:ad8c062e9b24e4b3a8408b23a0d8ab428"><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8hpp.html#ab701e3ac61a85b337ec5c1abaad6742d">json</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ad8c062e9b24e4b3a8408b23a0d8ab428">read_json_from_file</a> (const std::string &filename)</td></tr>
156 <tr class="memdesc:ad8c062e9b24e4b3a8408b23a0d8ab428"><td class="mdescLeft"> </td><td class="mdescRight">Read JSON from the given file. <a href="#ad8c062e9b24e4b3a8408b23a0d8ab428">More...</a><br /></td></tr>
157 <tr class="separator:ad8c062e9b24e4b3a8408b23a0d8ab428"><td class="memSeparator" colspan="2"> </td></tr>
158 <tr class="memitem:a876ed07783b27d38779f7cef4db673e6"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a876ed07783b27d38779f7cef4db673e6">read_data_to_aligned_array</a> (const std::string &filename)</td></tr>
159 <tr class="memdesc:a876ed07783b27d38779f7cef4db673e6"><td class="mdescLeft"> </td><td class="mdescRight">Read binary data from the file. <a href="#a876ed07783b27d38779f7cef4db673e6">More...</a><br /></td></tr>
160 <tr class="separator:a876ed07783b27d38779f7cef4db673e6"><td class="memSeparator" colspan="2"> </td></tr>
161 <tr class="memitem:a56c41cbb9de4bce25da45ecd74b46a81"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a56c41cbb9de4bce25da45ecd74b46a81">tsc_recovery</a> ()</td></tr>
162 <tr class="memdesc:a56c41cbb9de4bce25da45ecd74b46a81"><td class="mdescLeft"> </td><td class="mdescRight">Measure the TSC on the machine. <a href="#a56c41cbb9de4bce25da45ecd74b46a81">More...</a><br /></td></tr>
163 <tr class="separator:a56c41cbb9de4bce25da45ecd74b46a81"><td class="memSeparator" colspan="2"> </td></tr>
164 <tr class="memitem:a0ab5719a5f67d4d52057b2c4550fe930"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a0ab5719a5f67d4d52057b2c4550fe930">tsc_tick</a> ()</td></tr>
165 <tr class="memdesc:a0ab5719a5f67d4d52057b2c4550fe930"><td class="mdescLeft"> </td><td class="mdescRight">Return the current value of the TSC. <a href="#a0ab5719a5f67d4d52057b2c4550fe930">More...</a><br /></td></tr>
166 <tr class="separator:a0ab5719a5f67d4d52057b2c4550fe930"><td class="memSeparator" colspan="2"> </td></tr>
167 <tr class="memitem:af69d779517f2bdee3aba95bc38022074"><td class="memTemplParams" colspan="2">template<typename F , typename ... Args> </td></tr>
168 <tr class="memitem:af69d779517f2bdee3aba95bc38022074"><td class="memTemplItemLeft" align="right" valign="top">std::pair< double, double > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#af69d779517f2bdee3aba95bc38022074">run_benchmark</a> (F function, Args ... args)</td></tr>
169 <tr class="memdesc:af69d779517f2bdee3aba95bc38022074"><td class="mdescLeft"> </td><td class="mdescRight">Run the given function and return the mean run time and stddev. <a href="#af69d779517f2bdee3aba95bc38022074">More...</a><br /></td></tr>
170 <tr class="separator:af69d779517f2bdee3aba95bc38022074"><td class="memSeparator" colspan="2"> </td></tr>
171 <tr class="memitem:a8f4a12d5e7aa88ef72d3a59f9d0a85f0"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
172 <tr class="memitem:a8f4a12d5e7aa88ef72d3a59f9d0a85f0"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a8f4a12d5e7aa88ef72d3a59f9d0a85f0">assert_array_eq</a> (const T *reference, const T *actual, const int size)</td></tr>
173 <tr class="memdesc:a8f4a12d5e7aa88ef72d3a59f9d0a85f0"><td class="mdescLeft"> </td><td class="mdescRight">Assert elements of two arrays. It calls ASSERT_EQ for each element of the array. <a href="#a8f4a12d5e7aa88ef72d3a59f9d0a85f0">More...</a><br /></td></tr>
174 <tr class="separator:a8f4a12d5e7aa88ef72d3a59f9d0a85f0"><td class="memSeparator" colspan="2"> </td></tr>
175 <tr class="memitem:aea945be561738ef40c759d617b04255c"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
176 <tr class="memitem:aea945be561738ef40c759d617b04255c"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#aea945be561738ef40c759d617b04255c">assert_array_near</a> (const T *reference, const T *actual, const int size, const double precision)</td></tr>
177 <tr class="memdesc:aea945be561738ef40c759d617b04255c"><td class="mdescLeft"> </td><td class="mdescRight">Assert elements of two arrays. It calls ASSERT_NEAR for each element of the array. <a href="#aea945be561738ef40c759d617b04255c">More...</a><br /></td></tr>
178 <tr class="separator:aea945be561738ef40c759d617b04255c"><td class="memSeparator" colspan="2"> </td></tr>
179 <tr class="memitem:ab5ae003c98bada0196a7085942593271"><td class="memTemplParams" colspan="2">template<> </td></tr>
180 <tr class="memitem:ab5ae003c98bada0196a7085942593271"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ab5ae003c98bada0196a7085942593271">assert_array_near< complex_float ></a> (const <a class="el" href="structcomplex__float.html">complex_float</a> *reference, const <a class="el" href="structcomplex__float.html">complex_float</a> *actual, const int size, const double precision)</td></tr>
181 <tr class="separator:ab5ae003c98bada0196a7085942593271"><td class="memSeparator" colspan="2"> </td></tr>
182 <tr class="memitem:a2bbe1c5dcabc83ba7d8485888720da42"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
183 <tr class="memitem:a2bbe1c5dcabc83ba7d8485888720da42"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a2bbe1c5dcabc83ba7d8485888720da42">assert_avg_greater_complex</a> (const T *reference, const T *actual, const int size, const double precision)</td></tr>
184 <tr class="memdesc:a2bbe1c5dcabc83ba7d8485888720da42"><td class="mdescLeft"> </td><td class="mdescRight">Assert average diff of two arrays. It calls ASSERT_GT to check the average. <a href="#a2bbe1c5dcabc83ba7d8485888720da42">More...</a><br /></td></tr>
185 <tr class="separator:a2bbe1c5dcabc83ba7d8485888720da42"><td class="memSeparator" colspan="2"> </td></tr>
186 <tr class="memitem:adfa5a01b33723394c2a1fa179abea990"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
187 <tr class="memitem:adfa5a01b33723394c2a1fa179abea990"><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#adfa5a01b33723394c2a1fa179abea990">aligned_malloc</a> (const int size, const unsigned alignment)</td></tr>
188 <tr class="memdesc:adfa5a01b33723394c2a1fa179abea990"><td class="mdescLeft"> </td><td class="mdescRight">Allocates memory of the given size. <a href="#adfa5a01b33723394c2a1fa179abea990">More...</a><br /></td></tr>
189 <tr class="separator:adfa5a01b33723394c2a1fa179abea990"><td class="memSeparator" colspan="2"> </td></tr>
190 <tr class="memitem:a2f1a3a41e28280d05df6b8d212d9c5c2"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
191 <tr class="memitem:a2f1a3a41e28280d05df6b8d212d9c5c2"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a2f1a3a41e28280d05df6b8d212d9c5c2">aligned_free</a> (T *ptr)</td></tr>
192 <tr class="memdesc:a2f1a3a41e28280d05df6b8d212d9c5c2"><td class="mdescLeft"> </td><td class="mdescRight">Frees memory pointed by the given pointer. <a href="#a2f1a3a41e28280d05df6b8d212d9c5c2">More...</a><br /></td></tr>
193 <tr class="separator:a2f1a3a41e28280d05df6b8d212d9c5c2"><td class="memSeparator" colspan="2"> </td></tr>
194 <tr class="memitem:ae1d15fbbdb031b5ab34dfc289d93a6c9"><td class="memTemplParams" colspan="2">template<typename T , typename U > </td></tr>
195 <tr class="memitem:ae1d15fbbdb031b5ab34dfc289d93a6c9"><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ae1d15fbbdb031b5ab34dfc289d93a6c9">generate_random_numbers</a> (const long size, const unsigned alignment, U &distribution)</td></tr>
196 <tr class="memdesc:ae1d15fbbdb031b5ab34dfc289d93a6c9"><td class="mdescLeft"> </td><td class="mdescRight">generate random numbers. <a href="#ae1d15fbbdb031b5ab34dfc289d93a6c9">More...</a><br /></td></tr>
197 <tr class="separator:ae1d15fbbdb031b5ab34dfc289d93a6c9"><td class="memSeparator" colspan="2"> </td></tr>
198 <tr class="memitem:a6b7eb6e3593756a484e8e73ba7456683"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
199 <tr class="memitem:a6b7eb6e3593756a484e8e73ba7456683"><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a6b7eb6e3593756a484e8e73ba7456683">generate_random_data</a> (const long size, const unsigned alignment)</td></tr>
200 <tr class="memdesc:a6b7eb6e3593756a484e8e73ba7456683"><td class="mdescLeft"> </td><td class="mdescRight">generate random data. <a href="#a6b7eb6e3593756a484e8e73ba7456683">More...</a><br /></td></tr>
201 <tr class="separator:a6b7eb6e3593756a484e8e73ba7456683"><td class="memSeparator" colspan="2"> </td></tr>
202 <tr class="memitem:a152b12cc7a564929ac984e570020e548"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
203 <tr class="memitem:a152b12cc7a564929ac984e570020e548"><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#a152b12cc7a564929ac984e570020e548">generate_random_int_numbers</a> (const long size, const unsigned alignment, const T lo_range, const T up_range)</td></tr>
204 <tr class="memdesc:a152b12cc7a564929ac984e570020e548"><td class="mdescLeft"> </td><td class="mdescRight">generate integer random numbers. <a href="#a152b12cc7a564929ac984e570020e548">More...</a><br /></td></tr>
205 <tr class="separator:a152b12cc7a564929ac984e570020e548"><td class="memSeparator" colspan="2"> </td></tr>
206 <tr class="memitem:ad93fb4e37255c588def24071ede04229"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
207 <tr class="memitem:ad93fb4e37255c588def24071ede04229"><td class="memTemplItemLeft" align="right" valign="top">T * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="common_8hpp.html#ad93fb4e37255c588def24071ede04229">generate_random_real_numbers</a> (const long size, const unsigned alignment, const T lo_range, const T up_range)</td></tr>
208 <tr class="memdesc:ad93fb4e37255c588def24071ede04229"><td class="mdescLeft"> </td><td class="mdescRight">generate real random numbers. <a href="#ad93fb4e37255c588def24071ede04229">More...</a><br /></td></tr>
209 <tr class="separator:ad93fb4e37255c588def24071ede04229"><td class="memSeparator" colspan="2"> </td></tr>
211 <h2 class="groupheader">Macro Definition Documentation</h2>
212 <a id="a2c73062f66b2d8c71425ef3bc75ae946"></a>
213 <h2 class="memtitle"><span class="permalink"><a href="#a2c73062f66b2d8c71425ef3bc75ae946">◆ </a></span>_BBLIB_DPDK_</h2>
215 <div class="memitem">
216 <div class="memproto">
217 <table class="memname">
219 <td class="memname">#define _BBLIB_DPDK_</td>
222 </div><div class="memdoc">
224 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00040">40</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
228 <a id="a1c463cb9865e63120f666efd5a6555b5"></a>
229 <h2 class="memtitle"><span class="permalink"><a href="#a1c463cb9865e63120f666efd5a6555b5">◆ </a></span>ASSERT_ARRAY_EQ</h2>
231 <div class="memitem">
232 <div class="memproto">
233 <table class="memname">
235 <td class="memname">#define ASSERT_ARRAY_EQ</td>
237 <td class="paramtype"> </td>
238 <td class="paramname">reference, </td>
241 <td class="paramkey"></td>
243 <td class="paramtype"> </td>
244 <td class="paramname">actual, </td>
247 <td class="paramkey"></td>
249 <td class="paramtype"> </td>
250 <td class="paramname">size </td>
255 <td></td><td>   <a class="el" href="common_8hpp.html#a8f4a12d5e7aa88ef72d3a59f9d0a85f0">assert_array_eq</a>(reference, actual, size)</td>
258 </div><div class="memdoc">
260 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00058">58</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
264 <a id="a9a330f0a8f2feff43f1ccedfaf049e03"></a>
265 <h2 class="memtitle"><span class="permalink"><a href="#a9a330f0a8f2feff43f1ccedfaf049e03">◆ </a></span>ASSERT_ARRAY_NEAR</h2>
267 <div class="memitem">
268 <div class="memproto">
269 <table class="memname">
271 <td class="memname">#define ASSERT_ARRAY_NEAR</td>
273 <td class="paramtype"> </td>
274 <td class="paramname">reference, </td>
277 <td class="paramkey"></td>
279 <td class="paramtype"> </td>
280 <td class="paramname">actual, </td>
283 <td class="paramkey"></td>
285 <td class="paramtype"> </td>
286 <td class="paramname">size, </td>
289 <td class="paramkey"></td>
291 <td class="paramtype"> </td>
292 <td class="paramname">precision </td>
297 <td></td><td>   <a class="el" href="common_8hpp.html#aea945be561738ef40c759d617b04255c">assert_array_near</a>(reference, actual, size, precision)</td>
300 </div><div class="memdoc">
302 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00055">55</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
306 <a id="aa748fe650bfa70c23834297931a4a2a7"></a>
307 <h2 class="memtitle"><span class="permalink"><a href="#aa748fe650bfa70c23834297931a4a2a7">◆ </a></span>ASSERT_AVG_GREATER_COMPLEX</h2>
309 <div class="memitem">
310 <div class="memproto">
311 <table class="memname">
313 <td class="memname">#define ASSERT_AVG_GREATER_COMPLEX</td>
315 <td class="paramtype"> </td>
316 <td class="paramname">reference, </td>
319 <td class="paramkey"></td>
321 <td class="paramtype"> </td>
322 <td class="paramname">actual, </td>
325 <td class="paramkey"></td>
327 <td class="paramtype"> </td>
328 <td class="paramname">size, </td>
331 <td class="paramkey"></td>
333 <td class="paramtype"> </td>
334 <td class="paramname">precision </td>
339 <td></td><td>   <a class="el" href="common_8hpp.html#a2bbe1c5dcabc83ba7d8485888720da42">assert_avg_greater_complex</a>(reference, actual, size, precision)</td>
342 </div><div class="memdoc">
344 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00061">61</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
348 <h2 class="groupheader">Typedef Documentation</h2>
349 <a id="ab701e3ac61a85b337ec5c1abaad6742d"></a>
350 <h2 class="memtitle"><span class="permalink"><a href="#ab701e3ac61a85b337ec5c1abaad6742d">◆ </a></span>json</h2>
352 <div class="memitem">
353 <div class="memproto">
354 <table class="memname">
356 <td class="memname">using <a class="el" href="common_8hpp.html#ab701e3ac61a85b337ec5c1abaad6742d">json</a> = <a class="el" href="namespacenlohmann.html#ae6eede511f01c9f33342044d36a388fa">nlohmann::json</a></td>
359 </div><div class="memdoc">
361 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00053">53</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
365 <h2 class="groupheader">Function Documentation</h2>
366 <a id="a2f1a3a41e28280d05df6b8d212d9c5c2"></a>
367 <h2 class="memtitle"><span class="permalink"><a href="#a2f1a3a41e28280d05df6b8d212d9c5c2">◆ </a></span>aligned_free()</h2>
369 <div class="memitem">
370 <div class="memproto">
371 <table class="memname">
373 <td class="memname">void aligned_free </td>
375 <td class="paramtype">T * </td>
376 <td class="paramname"><em>ptr</em></td><td>)</td>
380 </div><div class="memdoc">
382 <p>Frees memory pointed by the given pointer. </p>
383 <p>aligned_free is a wrapper for functions that free memory allocated by aligned_malloc: 'rte_free' from DPDK if hugepages are defined and 'free' otherwise.</p>
384 <dl class="params"><dt>Parameters</dt><dd>
385 <table class="params">
386 <tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>Pointer to the allocated memory. </td></tr>
391 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00566">566</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
395 <a id="adfa5a01b33723394c2a1fa179abea990"></a>
396 <h2 class="memtitle"><span class="permalink"><a href="#adfa5a01b33723394c2a1fa179abea990">◆ </a></span>aligned_malloc()</h2>
398 <div class="memitem">
399 <div class="memproto">
400 <table class="memname">
402 <td class="memname">T* aligned_malloc </td>
404 <td class="paramtype">const int </td>
405 <td class="paramname"><em>size</em>, </td>
408 <td class="paramkey"></td>
410 <td class="paramtype">const unsigned </td>
411 <td class="paramname"><em>alignment</em> </td>
419 </div><div class="memdoc">
421 <p>Allocates memory of the given size. </p>
422 <p>aligned_malloc is wrapper to functions that allocate memory: 'rte_malloc' from DPDK if hugepages are defined, 'memalign' otherwise. Size is defined as a number of variables of given type e.g. floats, rather than bytes. It hides sizeof(T) multiplication and cast hence makes things cleaner.</p>
423 <dl class="params"><dt>Parameters</dt><dd>
424 <table class="params">
425 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the memory to allocate. </td></tr>
426 <tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Bytes alignment of the allocated memory. If 0, the return is a pointer that is suitably aligned for any kind of variable (in the same manner as malloc()). Otherwise, the return is a pointer that is a multiple of align. In this case, it must be a power of two. (Minimum alignment is the cacheline size, i.e. 64-bytes) </td></tr>
430 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory. </dd></dl>
432 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00544">544</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
436 <a id="a8f4a12d5e7aa88ef72d3a59f9d0a85f0"></a>
437 <h2 class="memtitle"><span class="permalink"><a href="#a8f4a12d5e7aa88ef72d3a59f9d0a85f0">◆ </a></span>assert_array_eq()</h2>
439 <div class="memitem">
440 <div class="memproto">
441 <table class="memname">
443 <td class="memname">void assert_array_eq </td>
445 <td class="paramtype">const T * </td>
446 <td class="paramname"><em>reference</em>, </td>
449 <td class="paramkey"></td>
451 <td class="paramtype">const T * </td>
452 <td class="paramname"><em>actual</em>, </td>
455 <td class="paramkey"></td>
457 <td class="paramtype">const int </td>
458 <td class="paramname"><em>size</em> </td>
466 </div><div class="memdoc">
468 <p>Assert elements of two arrays. It calls ASSERT_EQ for each element of the array. </p>
469 <dl class="params"><dt>Parameters</dt><dd>
470 <table class="params">
471 <tr><td class="paramdir">[in]</td><td class="paramname">reference</td><td>Array with reference values. </td></tr>
472 <tr><td class="paramdir">[in]</td><td class="paramname">actual</td><td>Array with the actual output. </td></tr>
473 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the array. </td></tr>
478 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00448">448</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
482 <a id="aea945be561738ef40c759d617b04255c"></a>
483 <h2 class="memtitle"><span class="permalink"><a href="#aea945be561738ef40c759d617b04255c">◆ </a></span>assert_array_near()</h2>
485 <div class="memitem">
486 <div class="memproto">
487 <table class="memname">
489 <td class="memname">void assert_array_near </td>
491 <td class="paramtype">const T * </td>
492 <td class="paramname"><em>reference</em>, </td>
495 <td class="paramkey"></td>
497 <td class="paramtype">const T * </td>
498 <td class="paramname"><em>actual</em>, </td>
501 <td class="paramkey"></td>
503 <td class="paramtype">const int </td>
504 <td class="paramname"><em>size</em>, </td>
507 <td class="paramkey"></td>
509 <td class="paramtype">const double </td>
510 <td class="paramname"><em>precision</em> </td>
518 </div><div class="memdoc">
520 <p>Assert elements of two arrays. It calls ASSERT_NEAR for each element of the array. </p>
521 <dl class="params"><dt>Parameters</dt><dd>
522 <table class="params">
523 <tr><td class="paramdir">[in]</td><td class="paramname">reference</td><td>Array with reference values. </td></tr>
524 <tr><td class="paramdir">[in]</td><td class="paramname">actual</td><td>Array with the actual output. </td></tr>
525 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the array. </td></tr>
526 <tr><td class="paramdir">[in]</td><td class="paramname">precision</td><td>Precision fo the comparision used by ASSERT_NEAR. </td></tr>
531 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00465">465</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
535 <a id="ab5ae003c98bada0196a7085942593271"></a>
536 <h2 class="memtitle"><span class="permalink"><a href="#ab5ae003c98bada0196a7085942593271">◆ </a></span>assert_array_near< complex_float >()</h2>
538 <div class="memitem">
539 <div class="memproto">
540 <table class="memname">
542 <td class="memname">void <a class="el" href="common_8hpp.html#aea945be561738ef40c759d617b04255c">assert_array_near</a>< <a class="el" href="structcomplex__float.html">complex_float</a> > </td>
544 <td class="paramtype">const <a class="el" href="structcomplex__float.html">complex_float</a> * </td>
545 <td class="paramname"><em>reference</em>, </td>
548 <td class="paramkey"></td>
550 <td class="paramtype">const <a class="el" href="structcomplex__float.html">complex_float</a> * </td>
551 <td class="paramname"><em>actual</em>, </td>
554 <td class="paramkey"></td>
556 <td class="paramtype">const int </td>
557 <td class="paramname"><em>size</em>, </td>
560 <td class="paramkey"></td>
562 <td class="paramtype">const double </td>
563 <td class="paramname"><em>precision</em> </td>
571 </div><div class="memdoc">
573 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00475">475</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
577 <a id="a2bbe1c5dcabc83ba7d8485888720da42"></a>
578 <h2 class="memtitle"><span class="permalink"><a href="#a2bbe1c5dcabc83ba7d8485888720da42">◆ </a></span>assert_avg_greater_complex()</h2>
580 <div class="memitem">
581 <div class="memproto">
582 <table class="memname">
584 <td class="memname">void assert_avg_greater_complex </td>
586 <td class="paramtype">const T * </td>
587 <td class="paramname"><em>reference</em>, </td>
590 <td class="paramkey"></td>
592 <td class="paramtype">const T * </td>
593 <td class="paramname"><em>actual</em>, </td>
596 <td class="paramkey"></td>
598 <td class="paramtype">const int </td>
599 <td class="paramname"><em>size</em>, </td>
602 <td class="paramkey"></td>
604 <td class="paramtype">const double </td>
605 <td class="paramname"><em>precision</em> </td>
613 </div><div class="memdoc">
615 <p>Assert average diff of two arrays. It calls ASSERT_GT to check the average. </p>
616 <dl class="params"><dt>Parameters</dt><dd>
617 <table class="params">
618 <tr><td class="paramdir">[in]</td><td class="paramname">reference</td><td>Array with reference values, interleaved IQ inputs. </td></tr>
619 <tr><td class="paramdir">[in]</td><td class="paramname">actual</td><td>Array with the actual output, interleaved IQ inputs. </td></tr>
620 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the array, based on complex inputs. </td></tr>
621 <tr><td class="paramdir">[in]</td><td class="paramname">precision</td><td>Precision for the comparison used by ASSERT_GT. </td></tr>
626 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00494">494</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
630 <a id="ae39390f41ba978a1f0d79691436c074a"></a>
631 <h2 class="memtitle"><span class="permalink"><a href="#ae39390f41ba978a1f0d79691436c074a">◆ </a></span>bind_to_cpu()</h2>
633 <div class="memitem">
634 <div class="memproto">
635 <table class="memname">
637 <td class="memname">int bind_to_cpu </td>
639 <td class="paramtype">const unsigned </td>
640 <td class="paramname"><em>cpu</em></td><td>)</td>
644 </div><div class="memdoc">
646 <p>Attach current process to the selected core. </p>
647 <dl class="params"><dt>Parameters</dt><dd>
648 <table class="params">
649 <tr><td class="paramdir">[in]</td><td class="paramname">cpu</td><td>Core number. </td></tr>
653 <dl class="section return"><dt>Returns</dt><dd>0 on success, -1 otherwise. </dd></dl>
655 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00047">47</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
656 <div class="dynheader">
657 Here is the caller graph for this function:</div>
658 <div class="dyncontent">
659 <div class="center"><img src="common_8hpp_ae39390f41ba978a1f0d79691436c074a_icgraph.png" border="0" usemap="#common_8hpp_ae39390f41ba978a1f0d79691436c074a_icgraph" alt=""/></div>
660 <map name="common_8hpp_ae39390f41ba978a1f0d79691436c074a_icgraph" id="common_8hpp_ae39390f41ba978a1f0d79691436c074a_icgraph">
661 <area shape="rect" id="node2" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="170,71,293,112"/>
662 <area shape="rect" id="node5" href="class_kernel_tests.html#a3cf2e25a99be565a4ab570737cfeac41" title="Run performance test case for a given function. " alt="" coords="145,137,317,163"/>
663 <area shape="rect" id="node3" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="378,5,531,47"/>
664 <area shape="rect" id="node4" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="365,71,544,112"/>
665 <area shape="rect" id="node6" href="c__plane__tests_8cc.html#a21d05f2c6607fc534e67ed32883de81f" title="TEST_P" alt="" coords="419,137,491,163"/>
671 <a id="a8265b710246f9019ff14556adf5eb35a"></a>
672 <h2 class="memtitle"><span class="permalink"><a href="#a8265b710246f9019ff14556adf5eb35a">◆ </a></span>calculate_statistics()</h2>
674 <div class="memitem">
675 <div class="memproto">
676 <table class="memname">
678 <td class="memname">std::pair<double, double> calculate_statistics </td>
680 <td class="paramtype">const std::vector< long > </td>
681 <td class="paramname"><em>values</em></td><td>)</td>
685 </div><div class="memdoc">
687 <p>Calculate the mean and variance from the result of the run_benchmark. </p>
688 <dl class="params"><dt>Parameters</dt><dd>
689 <table class="params">
690 <tr><td class="paramdir">[in]</td><td class="paramname">values</td><td>Vector with result values. </td></tr>
694 <dl class="section return"><dt>Returns</dt><dd>std::pair where the first element is mean and the second one is standard deviation. </dd></dl>
695 <dl class="section note"><dt>Note</dt><dd>It's not a general mean/stddev function it only works properly when feed with data from the benchmark function. </dd></dl>
697 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00060">60</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
698 <div class="dynheader">
699 Here is the caller graph for this function:</div>
700 <div class="dyncontent">
701 <div class="center"><img src="common_8hpp_a8265b710246f9019ff14556adf5eb35a_icgraph.png" border="0" usemap="#common_8hpp_a8265b710246f9019ff14556adf5eb35a_icgraph" alt=""/></div>
702 <map name="common_8hpp_a8265b710246f9019ff14556adf5eb35a_icgraph" id="common_8hpp_a8265b710246f9019ff14556adf5eb35a_icgraph">
703 <area shape="rect" id="node2" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="188,71,311,112"/>
704 <area shape="rect" id="node5" href="common_8hpp.html#af69d779517f2bdee3aba95bc38022074" title="Run the given function and return the mean run time and stddev. " alt="" coords="194,137,305,163"/>
705 <area shape="rect" id="node3" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="371,5,525,47"/>
706 <area shape="rect" id="node4" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="359,71,537,112"/>
707 <area shape="rect" id="node6" href="class_kernel_tests.html#a3cf2e25a99be565a4ab570737cfeac41" title="Run performance test case for a given function. " alt="" coords="362,137,534,163"/>
708 <area shape="rect" id="node7" href="c__plane__tests_8cc.html#a21d05f2c6607fc534e67ed32883de81f" title="TEST_P" alt="" coords="585,137,657,163"/>
714 <a id="a6b7eb6e3593756a484e8e73ba7456683"></a>
715 <h2 class="memtitle"><span class="permalink"><a href="#a6b7eb6e3593756a484e8e73ba7456683">◆ </a></span>generate_random_data()</h2>
717 <div class="memitem">
718 <div class="memproto">
719 <table class="memname">
721 <td class="memname">T* generate_random_data </td>
723 <td class="paramtype">const long </td>
724 <td class="paramname"><em>size</em>, </td>
727 <td class="paramkey"></td>
729 <td class="paramtype">const unsigned </td>
730 <td class="paramname"><em>alignment</em> </td>
738 </div><div class="memdoc">
740 <p>generate random data. </p>
741 <p>It allocates memory and populate it with random data using C++11 default engine and uniform integer distribution (bytes not floats are uniformly distributed). Don't forget to free allocated memory!</p>
742 <dl class="params"><dt>Parameters</dt><dd>
743 <table class="params">
744 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the memory to be filled with random data. </td></tr>
745 <tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Bytes alignment of the memory. </td></tr>
749 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory with random data. </dd></dl>
751 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00618">618</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
755 <a id="a152b12cc7a564929ac984e570020e548"></a>
756 <h2 class="memtitle"><span class="permalink"><a href="#a152b12cc7a564929ac984e570020e548">◆ </a></span>generate_random_int_numbers()</h2>
758 <div class="memitem">
759 <div class="memproto">
760 <table class="memname">
762 <td class="memname">T* generate_random_int_numbers </td>
764 <td class="paramtype">const long </td>
765 <td class="paramname"><em>size</em>, </td>
768 <td class="paramkey"></td>
770 <td class="paramtype">const unsigned </td>
771 <td class="paramname"><em>alignment</em>, </td>
774 <td class="paramkey"></td>
776 <td class="paramtype">const T </td>
777 <td class="paramname"><em>lo_range</em>, </td>
780 <td class="paramkey"></td>
782 <td class="paramtype">const T </td>
783 <td class="paramname"><em>up_range</em> </td>
791 </div><div class="memdoc">
793 <p>generate integer random numbers. </p>
794 <p>It allocates memory and populate it with random numbers using C++11 default engine and uniform integer distribution (where lo_range <= x < up_range). Don't forget to free allocated memory! The result type generated by the generator should be one of int types.</p>
795 <dl class="params"><dt>Parameters</dt><dd>
796 <table class="params">
797 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the memory to be filled with random data. </td></tr>
798 <tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Bytes alignment of the memory. </td></tr>
799 <tr><td class="paramdir">[in]</td><td class="paramname">lo_range</td><td>Lower bound of range of values returned by random generator. </td></tr>
800 <tr><td class="paramdir">[in]</td><td class="paramname">up_range</td><td>Upper bound of range of values returned by random generator. </td></tr>
804 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory with random data. </dd></dl>
806 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00640">640</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
810 <a id="ae1d15fbbdb031b5ab34dfc289d93a6c9"></a>
811 <h2 class="memtitle"><span class="permalink"><a href="#ae1d15fbbdb031b5ab34dfc289d93a6c9">◆ </a></span>generate_random_numbers()</h2>
813 <div class="memitem">
814 <div class="memproto">
815 <table class="memname">
817 <td class="memname">T* generate_random_numbers </td>
819 <td class="paramtype">const long </td>
820 <td class="paramname"><em>size</em>, </td>
823 <td class="paramkey"></td>
825 <td class="paramtype">const unsigned </td>
826 <td class="paramname"><em>alignment</em>, </td>
829 <td class="paramkey"></td>
831 <td class="paramtype">U & </td>
832 <td class="paramname"><em>distribution</em> </td>
840 </div><div class="memdoc">
842 <p>generate random numbers. </p>
843 <p>It allocates memory and populate it with random numbers using C++11 default engine and uniform real / int distribution (where lo_range <= x <up_range). Don't forget to free allocated memory!</p>
844 <dl class="params"><dt>Parameters</dt><dd>
845 <table class="params">
846 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the memory to be filled with random data. </td></tr>
847 <tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Bytes alignment of the memory. </td></tr>
848 <tr><td class="paramdir">[in]</td><td class="paramname">distribution</td><td>Distribuiton for random generator. </td></tr>
852 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory with random data. </dd></dl>
854 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00593">593</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
858 <a id="ad93fb4e37255c588def24071ede04229"></a>
859 <h2 class="memtitle"><span class="permalink"><a href="#ad93fb4e37255c588def24071ede04229">◆ </a></span>generate_random_real_numbers()</h2>
861 <div class="memitem">
862 <div class="memproto">
863 <table class="memname">
865 <td class="memname">T* generate_random_real_numbers </td>
867 <td class="paramtype">const long </td>
868 <td class="paramname"><em>size</em>, </td>
871 <td class="paramkey"></td>
873 <td class="paramtype">const unsigned </td>
874 <td class="paramname"><em>alignment</em>, </td>
877 <td class="paramkey"></td>
879 <td class="paramtype">const T </td>
880 <td class="paramname"><em>lo_range</em>, </td>
883 <td class="paramkey"></td>
885 <td class="paramtype">const T </td>
886 <td class="paramname"><em>up_range</em> </td>
894 </div><div class="memdoc">
896 <p>generate real random numbers. </p>
897 <p>It allocates memory and populate it with random numbers using C++11 default engine and uniform real distribution (where lo_range <= x <up_range). Don't forget to free allocated memory! The result type generated by the generator should be one of real types: float, double or long double.</p>
898 <dl class="params"><dt>Parameters</dt><dd>
899 <table class="params">
900 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the memory to be filled with random data. </td></tr>
901 <tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Bytes alignment of the memory. </td></tr>
902 <tr><td class="paramdir">[in]</td><td class="paramname">lo_range</td><td>Lower bound of range of values returned by random generator. </td></tr>
903 <tr><td class="paramdir">[in]</td><td class="paramname">up_range</td><td>Upper bound of range of values returned by random generator. </td></tr>
907 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory with random data. </dd></dl>
909 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00663">663</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
913 <a id="a39bf4f7770751080f5b72046abfd01a5"></a>
914 <h2 class="memtitle"><span class="permalink"><a href="#a39bf4f7770751080f5b72046abfd01a5">◆ </a></span>get_sequence()</h2>
916 <div class="memitem">
917 <div class="memproto">
918 <table class="memname">
920 <td class="memname">std::vector<unsigned> get_sequence </td>
922 <td class="paramtype">const unsigned </td>
923 <td class="paramname"><em>number</em></td><td>)</td>
927 </div><div class="memdoc">
929 <p>For a given number return sequence of number from 0 to number - 1. </p>
930 <dl class="params"><dt>Parameters</dt><dd>
931 <table class="params">
932 <tr><td class="paramdir">[in]</td><td class="paramname">number</td><td>Positive integer value. </td></tr>
936 <dl class="section return"><dt>Returns</dt><dd>Vector with the sorted integer numbers between 0 and number - 1. </dd></dl>
938 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00078">78</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
939 <div class="dynheader">
940 Here is the caller graph for this function:</div>
941 <div class="dyncontent">
942 <div class="center"><img src="common_8hpp_a39bf4f7770751080f5b72046abfd01a5_icgraph.png" border="0" usemap="#common_8hpp_a39bf4f7770751080f5b72046abfd01a5_icgraph" alt=""/></div>
943 <map name="common_8hpp_a39bf4f7770751080f5b72046abfd01a5_icgraph" id="common_8hpp_a39bf4f7770751080f5b72046abfd01a5_icgraph">
944 <area shape="rect" id="node2" href="c__plane__tests_8cc.html#ab0ad0e23f1b51f15bd9594a24a2c438f" title="TEST_P" alt="" coords="181,5,253,32"/>
945 <area shape="rect" id="node3" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="156,57,279,98"/>
946 <area shape="rect" id="node4" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="339,23,493,65"/>
947 <area shape="rect" id="node5" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="327,89,505,130"/>
953 <a id="a876ed07783b27d38779f7cef4db673e6"></a>
954 <h2 class="memtitle"><span class="permalink"><a href="#a876ed07783b27d38779f7cef4db673e6">◆ </a></span>read_data_to_aligned_array()</h2>
956 <div class="memitem">
957 <div class="memproto">
958 <table class="memname">
960 <td class="memname">char* read_data_to_aligned_array </td>
962 <td class="paramtype">const std::string & </td>
963 <td class="paramname"><em>filename</em></td><td>)</td>
967 </div><div class="memdoc">
969 <p>Read binary data from the file. </p>
970 <dl class="params"><dt>Parameters</dt><dd>
971 <table class="params">
972 <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>name of the binary file. </td></tr>
976 <dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated memory with data from the file. </dd></dl>
977 <dl class="exception"><dt>Exceptions</dt><dd>
978 <table class="exception">
979 <tr><td class="paramname">std::runtime_error</td><td>when memory cannot be allocated. </td></tr>
984 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00086">86</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
985 <div class="dynheader">
986 Here is the caller graph for this function:</div>
987 <div class="dyncontent">
988 <div class="center"><img src="common_8hpp_a876ed07783b27d38779f7cef4db673e6_icgraph.png" border="0" usemap="#common_8hpp_a876ed07783b27d38779f7cef4db673e6_icgraph" alt=""/></div>
989 <map name="common_8hpp_a876ed07783b27d38779f7cef4db673e6_icgraph" id="common_8hpp_a876ed07783b27d38779f7cef4db673e6_icgraph">
990 <area shape="rect" id="node2" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="211,71,333,112"/>
991 <area shape="rect" id="node5" href="class_kernel_tests.html#abf28e5ea54fab2b0685972fe6e75560a" title="Defines section in the conf.json that is used to load parameters from. " alt="" coords="199,238,345,265"/>
992 <area shape="rect" id="node3" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="406,5,559,47"/>
993 <area shape="rect" id="node4" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="393,71,572,112"/>
994 <area shape="rect" id="node6" href="class_c__plane.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="C_plane::SetUp" alt="" coords="425,137,540,163"/>
995 <area shape="rect" id="node7" href="class_test_chain.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="TestChain::SetUp" alt="" coords="419,187,546,214"/>
996 <area shape="rect" id="node8" href="class_prach_check.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="PrachCheck::SetUp" alt="" coords="413,238,552,265"/>
997 <area shape="rect" id="node9" href="class_prach_perf.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="PrachPerf::SetUp" alt="" coords="420,289,545,315"/>
998 <area shape="rect" id="node10" href="class_u__plane_check.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="U_planeCheck::SetUp" alt="" coords="406,339,559,366"/>
999 <area shape="rect" id="node11" href="class_u__plane_perf.html#a3a1707f6479611fdc609a3eb8a0cef1b" title="U_planePerf::SetUp" alt="" coords="413,390,552,417"/>
1005 <a id="ad8c062e9b24e4b3a8408b23a0d8ab428"></a>
1006 <h2 class="memtitle"><span class="permalink"><a href="#ad8c062e9b24e4b3a8408b23a0d8ab428">◆ </a></span>read_json_from_file()</h2>
1008 <div class="memitem">
1009 <div class="memproto">
1010 <table class="memname">
1012 <td class="memname"><a class="el" href="common_8hpp.html#ab701e3ac61a85b337ec5c1abaad6742d">json</a> read_json_from_file </td>
1014 <td class="paramtype">const std::string & </td>
1015 <td class="paramname"><em>filename</em></td><td>)</td>
1019 </div><div class="memdoc">
1021 <p>Read JSON from the given file. </p>
1022 <dl class="params"><dt>Parameters</dt><dd>
1023 <table class="params">
1024 <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>name of the .json file. </td></tr>
1028 <dl class="section return"><dt>Returns</dt><dd>JSON object with data. </dd></dl>
1029 <dl class="exception"><dt>Exceptions</dt><dd>
1030 <table class="exception">
1031 <tr><td class="paramname"><a class="el" href="structmissing__config__file__exception.html">missing_config_file_exception</a></td><td>when file cannot be opened. </td></tr>
1036 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00106">106</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
1037 <div class="dynheader">
1038 Here is the caller graph for this function:</div>
1039 <div class="dyncontent">
1040 <div class="center"><img src="common_8hpp_ad8c062e9b24e4b3a8408b23a0d8ab428_icgraph.png" border="0" usemap="#common_8hpp_ad8c062e9b24e4b3a8408b23a0d8ab428_icgraph" alt=""/></div>
1041 <map name="common_8hpp_ad8c062e9b24e4b3a8408b23a0d8ab428_icgraph" id="common_8hpp_ad8c062e9b24e4b3a8408b23a0d8ab428_icgraph">
1042 <area shape="rect" id="node2" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="226,41,349,83"/>
1043 <area shape="rect" id="node5" href="class_kernel_tests.html#aad8181b222f27240e9f07dcb6e620fa3" title="KernelTests::SetUpTestCase" alt="" coords="190,107,385,134"/>
1044 <area shape="rect" id="node6" href="class_kernel_tests.html#a6157ff083be863bba0a7804cd1788d96" title="KernelTests::get_number\l_of_cases" alt="" coords="203,159,371,200"/>
1045 <area shape="rect" id="node8" href="classxran_lib_wraper.html#a2e64fc338fcfaac25af91aae564777fa" title="xranLibWraper::xranLibWraper" alt="" coords="188,225,387,251"/>
1046 <area shape="rect" id="node3" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="447,5,601,47"/>
1047 <area shape="rect" id="node4" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="435,71,613,112"/>
1048 <area shape="rect" id="node7" href="c__plane__tests_8cc.html#ab0ad0e23f1b51f15bd9594a24a2c438f" title="TEST_P" alt="" coords="488,166,560,193"/>
1054 <a id="af69d779517f2bdee3aba95bc38022074"></a>
1055 <h2 class="memtitle"><span class="permalink"><a href="#af69d779517f2bdee3aba95bc38022074">◆ </a></span>run_benchmark()</h2>
1057 <div class="memitem">
1058 <div class="memproto">
1059 <table class="memname">
1061 <td class="memname">std::pair<double, double> run_benchmark </td>
1063 <td class="paramtype">F </td>
1064 <td class="paramname"><em>function</em>, </td>
1067 <td class="paramkey"></td>
1069 <td class="paramtype">Args ... </td>
1070 <td class="paramname"><em>args</em> </td>
1078 </div><div class="memdoc">
1080 <p>Run the given function and return the mean run time and stddev. </p>
1081 <dl class="params"><dt>Parameters</dt><dd>
1082 <table class="params">
1083 <tr><td class="paramdir">[in]</td><td class="paramname">function</td><td>Function to benchmark. </td></tr>
1084 <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Function's arguments. </td></tr>
1088 <dl class="section return"><dt>Returns</dt><dd>std::pair where the first element is mean and the second one is standard deviation. </dd></dl>
1090 <p class="definition">Definition at line <a class="el" href="common_8hpp_source.html#l00425">425</a> of file <a class="el" href="common_8hpp_source.html">common.hpp</a>.</p>
1091 <div class="dynheader">
1092 Here is the call graph for this function:</div>
1093 <div class="dyncontent">
1094 <div class="center"><img src="common_8hpp_af69d779517f2bdee3aba95bc38022074_cgraph.png" border="0" usemap="#common_8hpp_af69d779517f2bdee3aba95bc38022074_cgraph" alt=""/></div>
1095 <map name="common_8hpp_af69d779517f2bdee3aba95bc38022074_cgraph" id="common_8hpp_af69d779517f2bdee3aba95bc38022074_cgraph">
1096 <area shape="rect" id="node2" href="common_8hpp.html#a8265b710246f9019ff14556adf5eb35a" title="Calculate the mean and variance from the result of the run_benchmark. " alt="" coords="164,5,299,32"/>
1099 <div class="dynheader">
1100 Here is the caller graph for this function:</div>
1101 <div class="dyncontent">
1102 <div class="center"><img src="common_8hpp_af69d779517f2bdee3aba95bc38022074_icgraph.png" border="0" usemap="#common_8hpp_af69d779517f2bdee3aba95bc38022074_icgraph" alt=""/></div>
1103 <map name="common_8hpp_af69d779517f2bdee3aba95bc38022074_icgraph" id="common_8hpp_af69d779517f2bdee3aba95bc38022074_icgraph">
1104 <area shape="rect" id="node2" href="class_kernel_tests.html#a3cf2e25a99be565a4ab570737cfeac41" title="Run performance test case for a given function. " alt="" coords="164,5,336,32"/>
1105 <area shape="rect" id="node3" href="c__plane__tests_8cc.html#a21d05f2c6607fc534e67ed32883de81f" title="TEST_P" alt="" coords="384,5,456,32"/>
1111 <a id="a56c41cbb9de4bce25da45ecd74b46a81"></a>
1112 <h2 class="memtitle"><span class="permalink"><a href="#a56c41cbb9de4bce25da45ecd74b46a81">◆ </a></span>tsc_recovery()</h2>
1114 <div class="memitem">
1115 <div class="memproto">
1116 <table class="memname">
1118 <td class="memname">unsigned long tsc_recovery </td>
1120 <td class="paramname"></td><td>)</td>
1124 </div><div class="memdoc">
1126 <p>Measure the TSC on the machine. </p>
1127 <dl class="section return"><dt>Returns</dt><dd>Number of ticks per us </dd></dl>
1129 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00119">119</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
1130 <div class="dynheader">
1131 Here is the call graph for this function:</div>
1132 <div class="dyncontent">
1133 <div class="center"><img src="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_cgraph.png" border="0" usemap="#common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_cgraph" alt=""/></div>
1134 <map name="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_cgraph" id="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_cgraph">
1135 <area shape="rect" id="node2" href="common_8cpp.html#a0ab5719a5f67d4d52057b2c4550fe930" title="Return the current value of the TSC. " alt="" coords="151,5,219,32"/>
1138 <div class="dynheader">
1139 Here is the caller graph for this function:</div>
1140 <div class="dyncontent">
1141 <div class="center"><img src="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_icgraph.png" border="0" usemap="#common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_icgraph" alt=""/></div>
1142 <map name="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_icgraph" id="common_8hpp_a56c41cbb9de4bce25da45ecd74b46a81_icgraph">
1143 <area shape="rect" id="node2" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="187,39,309,80"/>
1144 <area shape="rect" id="node5" href="class_kernel_tests.html#aad8181b222f27240e9f07dcb6e620fa3" title="KernelTests::SetUpTestCase" alt="" coords="151,105,345,131"/>
1145 <area shape="rect" id="node3" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="406,5,559,47"/>
1146 <area shape="rect" id="node4" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="393,71,572,112"/>
1152 <a id="a0ab5719a5f67d4d52057b2c4550fe930"></a>
1153 <h2 class="memtitle"><span class="permalink"><a href="#a0ab5719a5f67d4d52057b2c4550fe930">◆ </a></span>tsc_tick()</h2>
1155 <div class="memitem">
1156 <div class="memproto">
1157 <table class="memname">
1159 <td class="memname">unsigned long tsc_tick </td>
1161 <td class="paramname"></td><td>)</td>
1165 </div><div class="memdoc">
1167 <p>Return the current value of the TSC. </p>
1168 <dl class="section return"><dt>Returns</dt><dd>Current TSC value </dd></dl>
1170 <p class="definition">Definition at line <a class="el" href="common_8cpp_source.html#l00162">162</a> of file <a class="el" href="common_8cpp_source.html">common.cpp</a>.</p>
1171 <div class="dynheader">
1172 Here is the caller graph for this function:</div>
1173 <div class="dyncontent">
1174 <div class="center"><img src="common_8hpp_a0ab5719a5f67d4d52057b2c4550fe930_icgraph.png" border="0" usemap="#common_8hpp_a0ab5719a5f67d4d52057b2c4550fe930_icgraph" alt=""/></div>
1175 <map name="common_8hpp_a0ab5719a5f67d4d52057b2c4550fe930_icgraph" id="common_8hpp_a0ab5719a5f67d4d52057b2c4550fe930_icgraph">
1176 <area shape="rect" id="node2" href="common_8hpp.html#a56c41cbb9de4bce25da45ecd74b46a81" title="Measure the TSC on the machine. " alt="" coords="121,95,219,122"/>
1177 <area shape="rect" id="node3" href="structreading__input__file__exception.html#a70518905d36686ddeeb2eb3b2682f016" title="reading_input_file\l_exception::what" alt="" coords="303,37,425,79"/>
1178 <area shape="rect" id="node6" href="class_kernel_tests.html#aad8181b222f27240e9f07dcb6e620fa3" title="KernelTests::SetUpTestCase" alt="" coords="267,103,461,130"/>
1179 <area shape="rect" id="node4" href="class_kernel_tests.html#a6dc1bccfd02f1a94b5c799c15cd98135" title="Load selected data from a JSON object. get_input_parameter loads data from parameters section of the ..." alt="" coords="522,5,675,47"/>
1180 <area shape="rect" id="node5" href="class_kernel_tests.html#adfbe724335d86320c9839c426c4d5715" title="KernelTests::get_reference\l_parameter" alt="" coords="509,71,688,112"/>
1186 </div><!-- contents -->
1187 <!-- start footer part -->
1188 <hr class="footer"/><address class="footer"><small>
1189 Generated by  <a href="http://www.doxygen.org/index.html">
1190 <img class="footer" src="doxygen.png" alt="doxygen"/>