1 <!-- HTML header for doxygen 1.8.9.1-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.11"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: arm_compute::support::cpp11 Namespace Reference</title>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="dynsections.js"></script>
13 <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtreedata.js"></script>
16 <script type="text/javascript" src="navtree.js"></script>
17 <script type="text/javascript">
18 $(document).ready(initResizable);
19 $(window).load(resizeHeight);
21 <link href="search/search.css" rel="stylesheet" type="text/css"/>
22 <script type="text/javascript" src="search/searchdata.js"></script>
23 <script type="text/javascript" src="search/search.js"></script>
24 <script type="text/javascript">
25 $(document).ready(function() { init_search(); });
27 <script type="text/x-mathjax-config">
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
32 </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
33 <link href="doxygen.css" rel="stylesheet" type="text/css" />
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
42 <div id="projectname">Compute Library
43  <span id="projectnumber">18.05</span>
50 <!-- end header part -->
51 <!-- Generated by Doxygen 1.8.11 -->
52 <script type="text/javascript">
53 var searchBox = new SearchBox("searchBox", "search",false,'Search');
55 <div id="navrow1" class="tabs">
57 <li><a href="index.xhtml"><span>Main Page</span></a></li>
58 <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
59 <li class="current"><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
61 <li><a href="files.xhtml"><span>Files</span></a></li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
80 <div id="navrow2" class="tabs2">
82 <li><a href="namespaces.xhtml"><span>Namespace List</span></a></li>
83 <li><a href="namespacemembers.xhtml"><span>Namespace Members</span></a></li>
87 <div id="side-nav" class="ui-resizable side-nav-resizable">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
97 <script type="text/javascript">
98 $(document).ready(function(){initNavTree('namespacearm__compute_1_1support_1_1cpp11.xhtml','');});
100 <div id="doc-content">
101 <!-- window showing the filter options -->
102 <div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
108 <!-- iframe showing the search results (closed by default) -->
109 <div id="MSearchResultsWindow">
110 <iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
116 <div class="summary">
117 <a href="#func-members">Functions</a> </div>
118 <div class="headertitle">
119 <div class="title">arm_compute::support::cpp11 Namespace Reference</div> </div>
121 <div class="contents">
122 <table class="memberdecls">
123 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
124 Functions</h2></td></tr>
125 <tr class="memitem:acc5dddee1cbe93a4eaf0a9f74ee96bb7"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
126 <tr class="memitem:acc5dddee1cbe93a4eaf0a9f74ee96bb7"><td class="memTemplItemLeft" align="right" valign="top">std::string </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">to_string</a> (T &&value)</td></tr>
127 <tr class="memdesc:acc5dddee1cbe93a4eaf0a9f74ee96bb7"><td class="mdescLeft"> </td><td class="mdescRight">Convert integer and float values to string. <a href="#acc5dddee1cbe93a4eaf0a9f74ee96bb7">More...</a><br /></td></tr>
128 <tr class="separator:acc5dddee1cbe93a4eaf0a9f74ee96bb7"><td class="memSeparator" colspan="2"> </td></tr>
129 <tr class="memitem:aeb1811acb18248b8919a2cf1203e3faf"><td class="memTemplParams" colspan="2">template<typename... Ts> </td></tr>
130 <tr class="memitem:aeb1811acb18248b8919a2cf1203e3faf"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aeb1811acb18248b8919a2cf1203e3faf">stoi</a> (Ts &&...args)</td></tr>
131 <tr class="memdesc:aeb1811acb18248b8919a2cf1203e3faf"><td class="mdescLeft"> </td><td class="mdescRight">Convert string values to integer. <a href="#aeb1811acb18248b8919a2cf1203e3faf">More...</a><br /></td></tr>
132 <tr class="separator:aeb1811acb18248b8919a2cf1203e3faf"><td class="memSeparator" colspan="2"> </td></tr>
133 <tr class="memitem:a3c9ee94e1de3032f244cf041310868b4"><td class="memTemplParams" colspan="2">template<typename... Ts> </td></tr>
134 <tr class="memitem:a3c9ee94e1de3032f244cf041310868b4"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a3c9ee94e1de3032f244cf041310868b4">stoul</a> (Ts &&...args)</td></tr>
135 <tr class="memdesc:a3c9ee94e1de3032f244cf041310868b4"><td class="mdescLeft"> </td><td class="mdescRight">Convert string values to unsigned long. <a href="#a3c9ee94e1de3032f244cf041310868b4">More...</a><br /></td></tr>
136 <tr class="separator:a3c9ee94e1de3032f244cf041310868b4"><td class="memSeparator" colspan="2"> </td></tr>
137 <tr class="memitem:aa4152693b62db2a43edcc0039de95e38"><td class="memTemplParams" colspan="2">template<typename... Ts> </td></tr>
138 <tr class="memitem:aa4152693b62db2a43edcc0039de95e38"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">stof</a> (Ts &&...args)</td></tr>
139 <tr class="memdesc:aa4152693b62db2a43edcc0039de95e38"><td class="mdescLeft"> </td><td class="mdescRight">Convert string values to float. <a href="#aa4152693b62db2a43edcc0039de95e38">More...</a><br /></td></tr>
140 <tr class="separator:aa4152693b62db2a43edcc0039de95e38"><td class="memSeparator" colspan="2"> </td></tr>
141 <tr class="memitem:ab71c35ca207b916a9f8b0336ab88484e"><td class="memTemplParams" colspan="2">template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> </td></tr>
142 <tr class="memitem:ab71c35ca207b916a9f8b0336ab88484e"><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">round</a> (T value)</td></tr>
143 <tr class="memdesc:ab71c35ca207b916a9f8b0336ab88484e"><td class="mdescLeft"> </td><td class="mdescRight">Round floating-point value with half value rounding away from zero. <a href="#ab71c35ca207b916a9f8b0336ab88484e">More...</a><br /></td></tr>
144 <tr class="separator:ab71c35ca207b916a9f8b0336ab88484e"><td class="memSeparator" colspan="2"> </td></tr>
145 <tr class="memitem:ae04d407202e3d50ce6a4c79ac00a5d59"><td class="memTemplParams" colspan="2">template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> </td></tr>
146 <tr class="memitem:ae04d407202e3d50ce6a4c79ac00a5d59"><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ae04d407202e3d50ce6a4c79ac00a5d59">trunc</a> (T value)</td></tr>
147 <tr class="memdesc:ae04d407202e3d50ce6a4c79ac00a5d59"><td class="mdescLeft"> </td><td class="mdescRight">Truncate floating-point value. <a href="#ae04d407202e3d50ce6a4c79ac00a5d59">More...</a><br /></td></tr>
148 <tr class="separator:ae04d407202e3d50ce6a4c79ac00a5d59"><td class="memSeparator" colspan="2"> </td></tr>
149 <tr class="memitem:a28096f8372c0ad762864c790917375e2"><td class="memTemplParams" colspan="2">template<typename T , typename = typename std::enable_if<std::is_floating_point<T>::value>::type> </td></tr>
150 <tr class="memitem:a28096f8372c0ad762864c790917375e2"><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">copysign</a> (T x, T y)</td></tr>
151 <tr class="memdesc:a28096f8372c0ad762864c790917375e2"><td class="mdescLeft"> </td><td class="mdescRight">Composes a floating point value with the magnitude of <code>x</code> and the sign of <code>y</code>. <a href="#a28096f8372c0ad762864c790917375e2">More...</a><br /></td></tr>
152 <tr class="separator:a28096f8372c0ad762864c790917375e2"><td class="memSeparator" colspan="2"> </td></tr>
153 <tr class="memitem:a6004ef5c66f38e0e45ff8fcc8a30392a"><td class="memTemplParams" colspan="2">template<typename... Ts> </td></tr>
154 <tr class="memitem:a6004ef5c66f38e0e45ff8fcc8a30392a"><td class="memTemplItemLeft" align="right" valign="top">int </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a6004ef5c66f38e0e45ff8fcc8a30392a">snprintf</a> (char *s, std::size_t n, const char *fmt, Ts &&...args)</td></tr>
155 <tr class="memdesc:a6004ef5c66f38e0e45ff8fcc8a30392a"><td class="mdescLeft"> </td><td class="mdescRight">Loads the data from the given location, converts them to character string equivalents and writes the result to a character string buffer. <a href="#a6004ef5c66f38e0e45ff8fcc8a30392a">More...</a><br /></td></tr>
156 <tr class="separator:a6004ef5c66f38e0e45ff8fcc8a30392a"><td class="memSeparator" colspan="2"> </td></tr>
157 <tr class="memitem:aae1437f4a38c4ada64e7a2586aa35bf8"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aae1437f4a38c4ada64e7a2586aa35bf8">to_string</a> (bool value)</td></tr>
158 <tr class="separator:aae1437f4a38c4ada64e7a2586aa35bf8"><td class="memSeparator" colspan="2"> </td></tr>
159 <tr class="memitem:a9e51e04e3f86c823883757ef22d4f39a"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a9e51e04e3f86c823883757ef22d4f39a">align</a> (std::size_t alignment, std::size_t size, void *&ptr, std::size_t &space)</td></tr>
160 <tr class="separator:a9e51e04e3f86c823883757ef22d4f39a"><td class="memSeparator" colspan="2"> </td></tr>
161 <tr class="memitem:a079a0ecb5fc05e0a107785f2573bc854"><td class="memTemplParams" colspan="2">template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value>::type> </td></tr>
162 <tr class="memitem:a079a0ecb5fc05e0a107785f2573bc854"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a079a0ecb5fc05e0a107785f2573bc854">isfinite</a> (T value)</td></tr>
163 <tr class="separator:a079a0ecb5fc05e0a107785f2573bc854"><td class="memSeparator" colspan="2"> </td></tr>
164 <tr class="memitem:a81dc1c64fed4ed4e9e4f4bf32cb8ba46"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a81dc1c64fed4ed4e9e4f4bf32cb8ba46">isfinite</a> (half_float::half value)</td></tr>
165 <tr class="separator:a81dc1c64fed4ed4e9e4f4bf32cb8ba46"><td class="memSeparator" colspan="2"> </td></tr>
167 <h2 class="groupheader">Function Documentation</h2>
168 <a class="anchor" id="a9e51e04e3f86c823883757ef22d4f39a"></a>
169 <div class="memitem">
170 <div class="memproto">
171 <table class="mlabels">
173 <td class="mlabels-left">
174 <table class="memname">
176 <td class="memname">void* arm_compute::support::cpp11::align </td>
178 <td class="paramtype">std::size_t </td>
179 <td class="paramname"><em>alignment</em>, </td>
182 <td class="paramkey"></td>
184 <td class="paramtype">std::size_t </td>
185 <td class="paramname"><em>size</em>, </td>
188 <td class="paramkey"></td>
190 <td class="paramtype">void *& </td>
191 <td class="paramname"><em>ptr</em>, </td>
194 <td class="paramkey"></td>
196 <td class="paramtype">std::size_t & </td>
197 <td class="paramname"><em>space</em> </td>
206 <td class="mlabels-right">
207 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
210 </div><div class="memdoc">
212 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00321">321</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
214 <p>Referenced by <a class="el" href="_assembly_helper_8h_source.xhtml#l00081">AssemblyKernelGlue< int8_t, int32_t >::run()</a>.</p>
215 <div class="fragment"><div class="line"><a name="l00322"></a><span class="lineno"> 322</span> {</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  std::uintptr_t pn = <span class="keyword">reinterpret_cast<</span>std::uintptr_t<span class="keyword">></span>(ptr);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  std::uintptr_t aligned = (pn + alignment - 1) & -alignment;</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  std::size_t padding = aligned - pn;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">if</span>(space < size + padding)</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  {</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  }</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> </div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  space -= padding;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span> </div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="keywordflow">return</span> ptr = <span class="keyword">reinterpret_cast<</span><span class="keywordtype">void</span> *<span class="keyword">></span>(aligned);</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> }</div></div><!-- fragment -->
218 <a class="anchor" id="a28096f8372c0ad762864c790917375e2"></a>
219 <div class="memitem">
220 <div class="memproto">
221 <table class="mlabels">
223 <td class="mlabels-left">
224 <table class="memname">
226 <td class="memname">T arm_compute::support::cpp11::copysign </td>
228 <td class="paramtype">T </td>
229 <td class="paramname"><em>x</em>, </td>
232 <td class="paramkey"></td>
234 <td class="paramtype">T </td>
235 <td class="paramname"><em>y</em> </td>
244 <td class="mlabels-right">
245 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
248 </div><div class="memdoc">
250 <p>Composes a floating point value with the magnitude of <code>x</code> and the sign of <code>y</code>. </p>
251 <dl class="section note"><dt>Note</dt><dd>This function implements the same behaviour as std::copysign except that it doesn't support Integral type. The latter is not in the namespace std in some Android toolchains.</dd></dl>
252 <dl class="params"><dt>Parameters</dt><dd>
253 <table class="params">
254 <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>value that contains the magnitude to be used in constructing the result. </td></tr>
255 <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>value that contains the sign to be used in construct in the result.</td></tr>
259 <dl class="section return"><dt>Returns</dt><dd>Floating-point value with magnitude of <code>x</code> and sign of <code>y</code>. </dd></dl>
261 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00289">289</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
263 <p>Referenced by <a class="el" href="tests_2_utils_8h_source.xhtml#l00085">arm_compute::test::round_half_even()</a>.</p>
264 <div class="fragment"><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> {</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">std::copysign</a>(x, y);</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a28096f8372c0ad762864c790917375e2"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">arm_compute::support::cpp11::copysign</a></div><div class="ttdeci">T copysign(T x, T y)</div><div class="ttdoc">Composes a floating point value with the magnitude of x and the sign of y. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00289">ToolchainSupport.h:289</a></div></div>
265 </div><!-- fragment -->
268 <a class="anchor" id="a079a0ecb5fc05e0a107785f2573bc854"></a>
269 <div class="memitem">
270 <div class="memproto">
271 <table class="mlabels">
273 <td class="mlabels-left">
274 <table class="memname">
276 <td class="memname">bool arm_compute::support::cpp11::isfinite </td>
278 <td class="paramtype">T </td>
279 <td class="paramname"><em>value</em></td><td>)</td>
284 <td class="mlabels-right">
285 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
288 </div><div class="memdoc">
290 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00338">338</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
292 <p>References <a class="el" href="_toolchain_support_8h_source.xhtml#l00343">isfinite()</a>.</p>
294 <p>Referenced by <a class="el" href="_validation_8h_source.xhtml#l00310">compare< AbsoluteTolerance< U > >::operator bool()</a>, <a class="el" href="_validation_8h_source.xhtml#l00336">compare< RelativeTolerance< U > >::operator bool()</a>, and <a class="el" href="_validation_8h_source.xhtml#l00457">arm_compute::test::validation::validate_wrap()</a>.</p>
295 <div class="fragment"><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> {</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a81dc1c64fed4ed4e9e4f4bf32cb8ba46">std::isfinite</a>(value);</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a81dc1c64fed4ed4e9e4f4bf32cb8ba46"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a81dc1c64fed4ed4e9e4f4bf32cb8ba46">arm_compute::support::cpp11::isfinite</a></div><div class="ttdeci">bool isfinite(half_float::half value)</div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00343">ToolchainSupport.h:343</a></div></div>
296 </div><!-- fragment -->
299 <a class="anchor" id="a81dc1c64fed4ed4e9e4f4bf32cb8ba46"></a>
300 <div class="memitem">
301 <div class="memproto">
302 <table class="mlabels">
304 <td class="mlabels-left">
305 <table class="memname">
307 <td class="memname">bool arm_compute::support::cpp11::isfinite </td>
309 <td class="paramtype">half_float::half </td>
310 <td class="paramname"><em>value</em></td><td>)</td>
315 <td class="mlabels-right">
316 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
319 </div><div class="memdoc">
321 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00343">343</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
323 <p>Referenced by <a class="el" href="_toolchain_support_8h_source.xhtml#l00338">isfinite()</a>.</p>
324 <div class="fragment"><div class="line"><a name="l00344"></a><span class="lineno"> 344</span> {</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a81dc1c64fed4ed4e9e4f4bf32cb8ba46">half_float::isfinite</a>(value);</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a81dc1c64fed4ed4e9e4f4bf32cb8ba46"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a81dc1c64fed4ed4e9e4f4bf32cb8ba46">arm_compute::support::cpp11::isfinite</a></div><div class="ttdeci">bool isfinite(half_float::half value)</div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00343">ToolchainSupport.h:343</a></div></div>
325 </div><!-- fragment -->
328 <a class="anchor" id="ab71c35ca207b916a9f8b0336ab88484e"></a>
329 <div class="memitem">
330 <div class="memproto">
331 <table class="mlabels">
333 <td class="mlabels-left">
334 <table class="memname">
336 <td class="memname">T arm_compute::support::cpp11::round </td>
338 <td class="paramtype">T </td>
339 <td class="paramname"><em>value</em></td><td>)</td>
344 <td class="mlabels-right">
345 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
348 </div><div class="memdoc">
350 <p>Round floating-point value with half value rounding away from zero. </p>
351 <dl class="section note"><dt>Note</dt><dd>This function implements the same behaviour as std::round except that it doesn't support Integral type. The latter is not in the namespace std in some Android toolchains.</dd></dl>
352 <dl class="params"><dt>Parameters</dt><dd>
353 <table class="params">
354 <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>floating-point value to be rounded.</td></tr>
358 <dl class="section return"><dt>Returns</dt><dd>Floating-point value of rounded <code>value</code>. </dd></dl>
360 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00257">257</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
362 <p>Referenced by <a class="el" href="tests_2_utils_8h_source.xhtml#l00085">arm_compute::test::round_half_even()</a>.</p>
363 <div class="fragment"><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> {</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="comment">//Workaround Valgrind's mismatches: when running from Valgrind the call to std::round(-4.500000) == -4.000000 instead of 5.00000</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">return</span> (value < 0.f) ? <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(value - 0.5f) : static_cast<int>(value + 0.5f);</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> }</div></div><!-- fragment -->
366 <a class="anchor" id="a6004ef5c66f38e0e45ff8fcc8a30392a"></a>
367 <div class="memitem">
368 <div class="memproto">
369 <table class="mlabels">
371 <td class="mlabels-left">
372 <table class="memname">
374 <td class="memname">int arm_compute::support::cpp11::snprintf </td>
376 <td class="paramtype">char * </td>
377 <td class="paramname"><em>s</em>, </td>
380 <td class="paramkey"></td>
382 <td class="paramtype">std::size_t </td>
383 <td class="paramname"><em>n</em>, </td>
386 <td class="paramkey"></td>
388 <td class="paramtype">const char * </td>
389 <td class="paramname"><em>fmt</em>, </td>
392 <td class="paramkey"></td>
394 <td class="paramtype">Ts &&... </td>
395 <td class="paramname"><em>args</em> </td>
404 <td class="mlabels-right">
405 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
408 </div><div class="memdoc">
410 <p>Loads the data from the given location, converts them to character string equivalents and writes the result to a character string buffer. </p>
411 <dl class="params"><dt>Parameters</dt><dd>
412 <table class="params">
413 <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>Pointer to a character string to write to </td></tr>
414 <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Up to buf_size - 1 characters may be written, plus the null terminator </td></tr>
415 <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>Pointer to a null-terminated multibyte string specifying how to interpret the data. </td></tr>
416 <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Arguments forwarded to std::snprintf.</td></tr>
420 <dl class="section return"><dt>Returns</dt><dd>Number of characters that would have been written for a sufficiently large buffer if successful (not including the terminating null character), or a negative value if an error occurred. </dd></dl>
422 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00306">306</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
424 <p>Referenced by <a class="el" href="arm__compute_2core_2utils_2logging_2_helpers_8h_source.xhtml#l00048">arm_compute::logging::string_with_format()</a>.</p>
425 <div class="fragment"><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> {</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a6004ef5c66f38e0e45ff8fcc8a30392a">std::snprintf</a>(s, n, fmt, std::forward<Ts>(args)...);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a6004ef5c66f38e0e45ff8fcc8a30392a"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a6004ef5c66f38e0e45ff8fcc8a30392a">arm_compute::support::cpp11::snprintf</a></div><div class="ttdeci">int snprintf(char *s, std::size_t n, const char *fmt, Ts &&...args)</div><div class="ttdoc">Loads the data from the given location, converts them to character string equivalents and writes the ...</div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00306">ToolchainSupport.h:306</a></div></div>
426 </div><!-- fragment -->
429 <a class="anchor" id="aa4152693b62db2a43edcc0039de95e38"></a>
430 <div class="memitem">
431 <div class="memproto">
432 <table class="memname">
434 <td class="memname">int arm_compute::support::cpp11::stof </td>
436 <td class="paramtype">Ts &&... </td>
437 <td class="paramname"><em>args</em></td><td>)</td>
441 </div><div class="memdoc">
443 <p>Convert string values to float. </p>
444 <dl class="section note"><dt>Note</dt><dd>This function acts as a convenience wrapper around std::stof. The latter is missing in some Android toolchains.</dd></dl>
445 <dl class="params"><dt>Parameters</dt><dd>
446 <table class="params">
447 <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Arguments forwarded to std::stof.</td></tr>
451 <dl class="section return"><dt>Returns</dt><dd>Float representation of input string. </dd></dl>
453 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00242">242</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
454 <div class="fragment"><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> {</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">return ::std::stof</a>(std::forward<Ts>(args)...);</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_aa4152693b62db2a43edcc0039de95e38"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">arm_compute::support::cpp11::stof</a></div><div class="ttdeci">int stof(Ts &&...args)</div><div class="ttdoc">Convert string values to float. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00242">ToolchainSupport.h:242</a></div></div>
455 </div><!-- fragment -->
458 <a class="anchor" id="aeb1811acb18248b8919a2cf1203e3faf"></a>
459 <div class="memitem">
460 <div class="memproto">
461 <table class="memname">
463 <td class="memname">int arm_compute::support::cpp11::stoi </td>
465 <td class="paramtype">Ts &&... </td>
466 <td class="paramname"><em>args</em></td><td>)</td>
470 </div><div class="memdoc">
472 <p>Convert string values to integer. </p>
473 <dl class="section note"><dt>Note</dt><dd>This function acts as a convenience wrapper around std::stoi. The latter is missing in some Android toolchains.</dd></dl>
474 <dl class="params"><dt>Parameters</dt><dd>
475 <table class="params">
476 <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Arguments forwarded to std::stoi.</td></tr>
480 <dl class="section return"><dt>Returns</dt><dd>Integer representation of input string. </dd></dl>
482 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00212">212</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
484 <p>Referenced by <a class="el" href="_test_filter_8cpp_source.xhtml#l00043">TestFilter::is_selected()</a>.</p>
485 <div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aeb1811acb18248b8919a2cf1203e3faf">return ::std::stoi</a>(std::forward<Ts>(args)...);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_aeb1811acb18248b8919a2cf1203e3faf"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aeb1811acb18248b8919a2cf1203e3faf">arm_compute::support::cpp11::stoi</a></div><div class="ttdeci">int stoi(Ts &&...args)</div><div class="ttdoc">Convert string values to integer. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00212">ToolchainSupport.h:212</a></div></div>
486 </div><!-- fragment -->
489 <a class="anchor" id="a3c9ee94e1de3032f244cf041310868b4"></a>
490 <div class="memitem">
491 <div class="memproto">
492 <table class="memname">
494 <td class="memname">int arm_compute::support::cpp11::stoul </td>
496 <td class="paramtype">Ts &&... </td>
497 <td class="paramname"><em>args</em></td><td>)</td>
501 </div><div class="memdoc">
503 <p>Convert string values to unsigned long. </p>
504 <dl class="section note"><dt>Note</dt><dd>This function acts as a convenience wrapper around std::stoul. The latter is missing in some Android toolchains.</dd></dl>
505 <dl class="params"><dt>Parameters</dt><dd>
506 <table class="params">
507 <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Arguments forwarded to std::stoul.</td></tr>
511 <dl class="section return"><dt>Returns</dt><dd>Unsigned long representation of input string. </dd></dl>
513 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00227">227</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
514 <div class="fragment"><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> {</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a3c9ee94e1de3032f244cf041310868b4">return ::std::stoul</a>(std::forward<Ts>(args)...);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a3c9ee94e1de3032f244cf041310868b4"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a3c9ee94e1de3032f244cf041310868b4">arm_compute::support::cpp11::stoul</a></div><div class="ttdeci">int stoul(Ts &&...args)</div><div class="ttdoc">Convert string values to unsigned long. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00227">ToolchainSupport.h:227</a></div></div>
515 </div><!-- fragment -->
518 <a class="anchor" id="acc5dddee1cbe93a4eaf0a9f74ee96bb7"></a>
519 <div class="memitem">
520 <div class="memproto">
521 <table class="mlabels">
523 <td class="mlabels-left">
524 <table class="memname">
526 <td class="memname">std::string arm_compute::support::cpp11::to_string </td>
528 <td class="paramtype">T && </td>
529 <td class="paramname"><em>value</em></td><td>)</td>
534 <td class="mlabels-right">
535 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
538 </div><div class="memdoc">
540 <p>Convert integer and float values to string. </p>
541 <dl class="section note"><dt>Note</dt><dd>This function acts as a convenience wrapper around std::to_string. The latter is missing in some Android toolchains.</dd></dl>
542 <dl class="params"><dt>Parameters</dt><dd>
543 <table class="params">
544 <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>Value to be converted to string.</td></tr>
548 <dl class="section return"><dt>Returns</dt><dd>String representation of <code>value</code>. </dd></dl>
550 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00197">197</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
552 <p>References <a class="el" href="_toolchain_support_8h_source.xhtml#l00312">to_string()</a>.</p>
554 <p>Referenced by <a class="el" href="_u_n_i_t_2_fixed_point_8cpp_source.xhtml#l00067">arm_compute::test::validation::DATA_TEST_CASE()</a>, <a class="el" href="_initializer_list_dataset_8h_source.xhtml#l00085">InitializerListDataset< T >::iterator::description()</a>, <a class="el" href="_range_dataset_8h_source.xhtml#l00087">RangeDataset< T >::iterator::description()</a>, <a class="el" href="_singleton_dataset_8h_source.xhtml#l00094">SingletonDataset< T >::iterator::description()</a>, <a class="el" href="_container_dataset_8h_source.xhtml#l00100">ContainerDataset< T >::iterator::description()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00128">arm_compute::utils::get_typestring()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00688">arm_compute::test::get_typestring()</a>, <a class="el" href="tests_2framework_2_utils_8h_source.xhtml#l00136">arm_compute::test::join()</a>, <a class="el" href="main_8cpp_source.xhtml#l00063">main()</a>, <a class="el" href="_open_c_l_timer_8cpp_source.xhtml#l00166">OpenCLTimer::measurements()</a>, <a class="el" href="_scheduler_timer_8cpp_source.xhtml#l00147">SchedulerTimer::measurements()</a>, <a class="el" href="_mali_counter_8cpp_source.xhtml#l00423">MaliCounter::measurements()</a>, and <a class="el" href="_size2_d_8h_source.xhtml#l00068">Size2D::to_string()</a>.</p>
555 <div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aae1437f4a38c4ada64e7a2586aa35bf8">return ::std::to_string</a>(std::forward<T>(value));</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_aae1437f4a38c4ada64e7a2586aa35bf8"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aae1437f4a38c4ada64e7a2586aa35bf8">arm_compute::support::cpp11::to_string</a></div><div class="ttdeci">std::string to_string(bool value)</div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00312">ToolchainSupport.h:312</a></div></div>
556 </div><!-- fragment -->
559 <a class="anchor" id="aae1437f4a38c4ada64e7a2586aa35bf8"></a>
560 <div class="memitem">
561 <div class="memproto">
562 <table class="mlabels">
564 <td class="mlabels-left">
565 <table class="memname">
567 <td class="memname">std::string arm_compute::support::cpp11::to_string </td>
569 <td class="paramtype">bool </td>
570 <td class="paramname"><em>value</em></td><td>)</td>
575 <td class="mlabels-right">
576 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
579 </div><div class="memdoc">
581 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00312">312</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
583 <p>Referenced by <a class="el" href="_toolchain_support_8h_source.xhtml#l00197">to_string()</a>.</p>
584 <div class="fragment"><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> {</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  std::stringstream str;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  str << std::boolalpha << value;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">return</span> str.str();</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span> }</div></div><!-- fragment -->
587 <a class="anchor" id="ae04d407202e3d50ce6a4c79ac00a5d59"></a>
588 <div class="memitem">
589 <div class="memproto">
590 <table class="mlabels">
592 <td class="mlabels-left">
593 <table class="memname">
595 <td class="memname">T arm_compute::support::cpp11::trunc </td>
597 <td class="paramtype">T </td>
598 <td class="paramname"><em>value</em></td><td>)</td>
603 <td class="mlabels-right">
604 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
607 </div><div class="memdoc">
609 <p>Truncate floating-point value. </p>
610 <dl class="section note"><dt>Note</dt><dd>This function implements the same behaviour as std::truncate except that it doesn't support Integral type. The latter is not in the namespace std in some Android toolchains.</dd></dl>
611 <dl class="params"><dt>Parameters</dt><dd>
612 <table class="params">
613 <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>floating-point value to be truncated.</td></tr>
617 <dl class="section return"><dt>Returns</dt><dd>Floating-point value of truncated <code>value</code>. </dd></dl>
619 <p>Definition at line <a class="el" href="_toolchain_support_8h_source.xhtml#l00273">273</a> of file <a class="el" href="_toolchain_support_8h_source.xhtml">ToolchainSupport.h</a>.</p>
621 <p>Referenced by <a class="el" href="tests_2validation_2reference_2_utils_8h_source.xhtml#l00098">arm_compute::test::validation::apply_2d_spatial_filter()</a>.</p>
622 <div class="fragment"><div class="line"><a name="l00274"></a><span class="lineno"> 274</span> {</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ae04d407202e3d50ce6a4c79ac00a5d59">std::trunc</a>(value);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span> }</div><div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_ae04d407202e3d50ce6a4c79ac00a5d59"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ae04d407202e3d50ce6a4c79ac00a5d59">arm_compute::support::cpp11::trunc</a></div><div class="ttdeci">T trunc(T value)</div><div class="ttdoc">Truncate floating-point value. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00273">ToolchainSupport.h:273</a></div></div>
623 </div><!-- fragment -->
626 </div><!-- contents -->
627 </div><!-- doc-content -->
628 <!-- start footer part -->
629 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
631 <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1support.xhtml">support</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1support_1_1cpp11.xhtml">cpp11</a></li>
632 <li class="footer">Generated on Wed May 23 2018 11:36:43 for Compute Library by
633 <a href="http://www.doxygen.org/index.html">
634 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>