Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 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"> |
| 3 | <head> |
| 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>ArmNN: CounterDirectory Class 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="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1profiling_1_1_counter_directory.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-methods">Public Member Functions</a> | |
| 85 | <a href="classarmnn_1_1profiling_1_1_counter_directory-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">CounterDirectory Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for CounterDirectory:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1profiling_1_1_counter_directory.png" usemap="#CounterDirectory_map" alt=""/> |
| 97 | <map id="CounterDirectory_map" name="CounterDirectory_map"> |
| 98 | <area href="classarmnn_1_1profiling_1_1_i_counter_directory.html" alt="ICounterDirectory" shape="rect" coords="0,0,113,24"/> |
| 99 | <area href="classarmnn_1_1profiling_1_1_i_counter_registry.html" alt="ICounterRegistry" shape="rect" coords="123,0,236,24"/> |
| 100 | </map> |
| 101 | </div></div> |
| 102 | <table class="memberdecls"> |
| 103 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 104 | Public Member Functions</h2></td></tr> |
| 105 | <tr class="memitem:a0fc9b7d9a197eef913fddc3f2e4e8b74"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a0fc9b7d9a197eef913fddc3f2e4e8b74">CounterDirectory</a> ()=default</td></tr> |
| 106 | <tr class="separator:a0fc9b7d9a197eef913fddc3f2e4e8b74"><td class="memSeparator" colspan="2"> </td></tr> |
| 107 | <tr class="memitem:acf7538e5b98c77d22e3df30360a071a2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#acf7538e5b98c77d22e3df30360a071a2">~CounterDirectory</a> ()=default</td></tr> |
| 108 | <tr class="separator:acf7538e5b98c77d22e3df30360a071a2"><td class="memSeparator" colspan="2"> </td></tr> |
| 109 | <tr class="memitem:aaa547e84c90dc8dc30ac1115a7556124"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_category.html">Category</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#aaa547e84c90dc8dc30ac1115a7556124">RegisterCategory</a> (const std::string &categoryName, const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > &deviceUid=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>(), const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > &counterSetUid=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()) override</td></tr> |
| 110 | <tr class="separator:aaa547e84c90dc8dc30ac1115a7556124"><td class="memSeparator" colspan="2"> </td></tr> |
| 111 | <tr class="memitem:a6ec101239653ba9260e1362c5381e81d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_device.html">Device</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a6ec101239653ba9260e1362c5381e81d">RegisterDevice</a> (const std::string &deviceName, uint16_t cores=0, const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > &parentCategoryName=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()) override</td></tr> |
| 112 | <tr class="separator:a6ec101239653ba9260e1362c5381e81d"><td class="memSeparator" colspan="2"> </td></tr> |
| 113 | <tr class="memitem:a161604d904508d5b86b459c2c2ace4be"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_counter_set.html">CounterSet</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a161604d904508d5b86b459c2c2ace4be">RegisterCounterSet</a> (const std::string &counterSetName, uint16_t count=0, const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > &parentCategoryName=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()) override</td></tr> |
| 114 | <tr class="separator:a161604d904508d5b86b459c2c2ace4be"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | <tr class="memitem:ab9756dfaf9b36cc51262369a27d1384f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_counter.html">Counter</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ab9756dfaf9b36cc51262369a27d1384f">RegisterCounter</a> (const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> &backendId, const uint16_t uid, const std::string &parentCategoryName, uint16_t counterClass, uint16_t interpolation, double multiplier, const std::string &name, const std::string &description, const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > &units=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>(), const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > &numberOfCores=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>(), const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > &deviceUid=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>(), const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > &counterSetUid=<a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()) override</td></tr> |
| 116 | <tr class="separator:ab9756dfaf9b36cc51262369a27d1384f"><td class="memSeparator" colspan="2"> </td></tr> |
| 117 | <tr class="memitem:a4626db62503c13042a745a40399f8317"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a4626db62503c13042a745a40399f8317">GetCategoryCount</a> () const override</td></tr> |
| 118 | <tr class="separator:a4626db62503c13042a745a40399f8317"><td class="memSeparator" colspan="2"> </td></tr> |
| 119 | <tr class="memitem:ad742b37bc2beb568e083225f3fd8160b"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ad742b37bc2beb568e083225f3fd8160b">GetDeviceCount</a> () const override</td></tr> |
| 120 | <tr class="separator:ad742b37bc2beb568e083225f3fd8160b"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:ae3b7dbaa7317dacbcec25f30f6a16075"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ae3b7dbaa7317dacbcec25f30f6a16075">GetCounterSetCount</a> () const override</td></tr> |
| 122 | <tr class="separator:ae3b7dbaa7317dacbcec25f30f6a16075"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:ad9062caad1836f8e6b810e4e97bb19d1"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ad9062caad1836f8e6b810e4e97bb19d1">GetCounterCount</a> () const override</td></tr> |
| 124 | <tr class="separator:ad9062caad1836f8e6b810e4e97bb19d1"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <tr class="memitem:af55b37f13ace15889ce8a0b18dda3ed9"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacearmnn_1_1profiling.html#af55bc6e5233a4720fe8a813db470b06f">Categories</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#af55b37f13ace15889ce8a0b18dda3ed9">GetCategories</a> () const override</td></tr> |
| 126 | <tr class="separator:af55b37f13ace15889ce8a0b18dda3ed9"><td class="memSeparator" colspan="2"> </td></tr> |
| 127 | <tr class="memitem:ac9bdbed464222fa06875096a4f373ca8"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacearmnn_1_1profiling.html#a3ff1066867cb9bd3b08338957c414401">Devices</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ac9bdbed464222fa06875096a4f373ca8">GetDevices</a> () const override</td></tr> |
| 128 | <tr class="separator:ac9bdbed464222fa06875096a4f373ca8"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <tr class="memitem:afcb72c4151fd72abfffcb7dae0ed2817"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacearmnn_1_1profiling.html#acfe20da73b5dc66439a65b49f04f7a21">CounterSets</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#afcb72c4151fd72abfffcb7dae0ed2817">GetCounterSets</a> () const override</td></tr> |
| 130 | <tr class="separator:afcb72c4151fd72abfffcb7dae0ed2817"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <tr class="memitem:a6d7f92b987338cab6cbfbad8d53a9738"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacearmnn_1_1profiling.html#aeeb6904ffbae435c8d0a7138427688f4">Counters</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a6d7f92b987338cab6cbfbad8d53a9738">GetCounters</a> () const override</td></tr> |
| 132 | <tr class="separator:a6d7f92b987338cab6cbfbad8d53a9738"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <tr class="memitem:aab31f60f412b119002a465e13d5165f0"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_category.html">Category</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#aab31f60f412b119002a465e13d5165f0">GetCategory</a> (const std::string &name) const override</td></tr> |
| 134 | <tr class="separator:aab31f60f412b119002a465e13d5165f0"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | <tr class="memitem:aa898e858d26d200fbc3788ac6d14fd90"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_device.html">Device</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#aa898e858d26d200fbc3788ac6d14fd90">GetDevice</a> (uint16_t uid) const override</td></tr> |
| 136 | <tr class="separator:aa898e858d26d200fbc3788ac6d14fd90"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:ad368fc6d788ff64cc25cafe2b40265c6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_counter_set.html">CounterSet</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ad368fc6d788ff64cc25cafe2b40265c6">GetCounterSet</a> (uint16_t uid) const override</td></tr> |
| 138 | <tr class="separator:ad368fc6d788ff64cc25cafe2b40265c6"><td class="memSeparator" colspan="2"> </td></tr> |
| 139 | <tr class="memitem:aefdd6df4feb698935d16311be966fda5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_counter.html">Counter</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#aefdd6df4feb698935d16311be966fda5">GetCounter</a> (uint16_t uid) const override</td></tr> |
| 140 | <tr class="separator:aefdd6df4feb698935d16311be966fda5"><td class="memSeparator" colspan="2"> </td></tr> |
| 141 | <tr class="memitem:a63fc4d050f681a84653c1d861e989f45"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a63fc4d050f681a84653c1d861e989f45">IsCategoryRegistered</a> (const std::string &categoryName) const</td></tr> |
| 142 | <tr class="separator:a63fc4d050f681a84653c1d861e989f45"><td class="memSeparator" colspan="2"> </td></tr> |
| 143 | <tr class="memitem:a82cdaf1dbfea445bda6018760140ab50"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a82cdaf1dbfea445bda6018760140ab50">IsDeviceRegistered</a> (uint16_t deviceUid) const</td></tr> |
| 144 | <tr class="separator:a82cdaf1dbfea445bda6018760140ab50"><td class="memSeparator" colspan="2"> </td></tr> |
| 145 | <tr class="memitem:ae1e135cd44b3b612ded4decaed61ae1b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#ae1e135cd44b3b612ded4decaed61ae1b">IsDeviceRegistered</a> (const std::string &deviceName) const</td></tr> |
| 146 | <tr class="separator:ae1e135cd44b3b612ded4decaed61ae1b"><td class="memSeparator" colspan="2"> </td></tr> |
| 147 | <tr class="memitem:a38edfdaaf346b8b2ad60ba9ab591fdff"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">IsCounterSetRegistered</a> (uint16_t counterSetUid) const</td></tr> |
| 148 | <tr class="separator:a38edfdaaf346b8b2ad60ba9ab591fdff"><td class="memSeparator" colspan="2"> </td></tr> |
| 149 | <tr class="memitem:a59397e9294a483953bdf682f16a8a3cd"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a59397e9294a483953bdf682f16a8a3cd">IsCounterSetRegistered</a> (const std::string &counterSetName) const</td></tr> |
| 150 | <tr class="separator:a59397e9294a483953bdf682f16a8a3cd"><td class="memSeparator" colspan="2"> </td></tr> |
| 151 | <tr class="memitem:abd87d40b4a54b7e1625cb765768553b9"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#abd87d40b4a54b7e1625cb765768553b9">IsCounterRegistered</a> (uint16_t counterUid) const</td></tr> |
| 152 | <tr class="separator:abd87d40b4a54b7e1625cb765768553b9"><td class="memSeparator" colspan="2"> </td></tr> |
| 153 | <tr class="memitem:a74ff6a2d9003a0713863df27450f42ed"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#a74ff6a2d9003a0713863df27450f42ed">IsCounterRegistered</a> (const std::string &counterName) const</td></tr> |
| 154 | <tr class="separator:a74ff6a2d9003a0713863df27450f42ed"><td class="memSeparator" colspan="2"> </td></tr> |
| 155 | <tr class="memitem:aa71d36872f416feaa853788a7a7a7ef8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html#aa71d36872f416feaa853788a7a7a7ef8">Clear</a> ()</td></tr> |
| 156 | <tr class="separator:aa71d36872f416feaa853788a7a7a7ef8"><td class="memSeparator" colspan="2"> </td></tr> |
| 157 | <tr class="inherit_header pub_methods_classarmnn_1_1profiling_1_1_i_counter_directory"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1profiling_1_1_i_counter_directory')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html">ICounterDirectory</a></td></tr> |
| 158 | <tr class="memitem:ad5186479ccb3343cad2dcf8a288bede1 inherit pub_methods_classarmnn_1_1profiling_1_1_i_counter_directory"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#ad5186479ccb3343cad2dcf8a288bede1">~ICounterDirectory</a> ()</td></tr> |
| 159 | <tr class="separator:ad5186479ccb3343cad2dcf8a288bede1 inherit pub_methods_classarmnn_1_1profiling_1_1_i_counter_directory"><td class="memSeparator" colspan="2"> </td></tr> |
| 160 | <tr class="inherit_header pub_methods_classarmnn_1_1profiling_1_1_i_counter_registry"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1profiling_1_1_i_counter_registry')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html">ICounterRegistry</a></td></tr> |
| 161 | <tr class="memitem:ae975a04ac3e352f5ed0c13501a684cb5 inherit pub_methods_classarmnn_1_1profiling_1_1_i_counter_registry"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html#ae975a04ac3e352f5ed0c13501a684cb5">~ICounterRegistry</a> ()</td></tr> |
| 162 | <tr class="separator:ae975a04ac3e352f5ed0c13501a684cb5 inherit pub_methods_classarmnn_1_1profiling_1_1_i_counter_registry"><td class="memSeparator" colspan="2"> </td></tr> |
| 163 | </table> |
| 164 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 165 | <div class="textblock"> |
| 166 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00023">23</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 167 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 168 | <a id="a0fc9b7d9a197eef913fddc3f2e4e8b74"></a> |
| 169 | <h2 class="memtitle"><span class="permalink"><a href="#a0fc9b7d9a197eef913fddc3f2e4e8b74">◆ </a></span>CounterDirectory()</h2> |
| 170 | |
| 171 | <div class="memitem"> |
| 172 | <div class="memproto"> |
| 173 | <table class="mlabels"> |
| 174 | <tr> |
| 175 | <td class="mlabels-left"> |
| 176 | <table class="memname"> |
| 177 | <tr> |
| 178 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html">CounterDirectory</a> </td> |
| 179 | <td>(</td> |
| 180 | <td class="paramname"></td><td>)</td> |
| 181 | <td></td> |
| 182 | </tr> |
| 183 | </table> |
| 184 | </td> |
| 185 | <td class="mlabels-right"> |
| 186 | <span class="mlabels"><span class="mlabel">default</span></span> </td> |
| 187 | </tr> |
| 188 | </table> |
| 189 | </div><div class="memdoc"> |
| 190 | |
| 191 | </div> |
| 192 | </div> |
| 193 | <a id="acf7538e5b98c77d22e3df30360a071a2"></a> |
| 194 | <h2 class="memtitle"><span class="permalink"><a href="#acf7538e5b98c77d22e3df30360a071a2">◆ </a></span>~CounterDirectory()</h2> |
| 195 | |
| 196 | <div class="memitem"> |
| 197 | <div class="memproto"> |
| 198 | <table class="mlabels"> |
| 199 | <tr> |
| 200 | <td class="mlabels-left"> |
| 201 | <table class="memname"> |
| 202 | <tr> |
| 203 | <td class="memname">~<a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html">CounterDirectory</a> </td> |
| 204 | <td>(</td> |
| 205 | <td class="paramname"></td><td>)</td> |
| 206 | <td></td> |
| 207 | </tr> |
| 208 | </table> |
| 209 | </td> |
| 210 | <td class="mlabels-right"> |
| 211 | <span class="mlabels"><span class="mlabel">default</span></span> </td> |
| 212 | </tr> |
| 213 | </table> |
| 214 | </div><div class="memdoc"> |
| 215 | |
| 216 | </div> |
| 217 | </div> |
| 218 | <h2 class="groupheader">Member Function Documentation</h2> |
| 219 | <a id="aa71d36872f416feaa853788a7a7a7ef8"></a> |
| 220 | <h2 class="memtitle"><span class="permalink"><a href="#aa71d36872f416feaa853788a7a7a7ef8">◆ </a></span>Clear()</h2> |
| 221 | |
| 222 | <div class="memitem"> |
| 223 | <div class="memproto"> |
| 224 | <table class="memname"> |
| 225 | <tr> |
| 226 | <td class="memname">void Clear </td> |
| 227 | <td>(</td> |
| 228 | <td class="paramname"></td><td>)</td> |
| 229 | <td></td> |
| 230 | </tr> |
| 231 | </table> |
| 232 | </div><div class="memdoc"> |
| 233 | |
| 234 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00534">534</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 235 | |
| 236 | <p class="reference">References <a class="el" href="_optional_8hpp_source.html#l00053">OptionalBase::has_value()</a>, and <a class="el" href="_optional_8hpp_source.html#l00146">OptionalReferenceSwitch< std::is_reference< T >::value, T >::value()</a>.</p> |
| 237 | |
| 238 | <p class="reference">Referenced by <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, and <a class="el" href="_profiling_service_8cpp_source.html#l00290">ProfilingService::GetSendTimelinePacket()</a>.</p> |
| 239 | <div class="fragment"><div class="line"><a name="l00535"></a><span class="lineno"> 535</span> {</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// Clear all the counter directory contents</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  m_Categories.clear();</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  m_Devices.clear();</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  m_CounterSets.clear();</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  m_Counters.clear();</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span> }</div></div><!-- fragment --> |
| 240 | </div> |
| 241 | </div> |
| 242 | <a id="af55b37f13ace15889ce8a0b18dda3ed9"></a> |
| 243 | <h2 class="memtitle"><span class="permalink"><a href="#af55b37f13ace15889ce8a0b18dda3ed9">◆ </a></span>GetCategories()</h2> |
| 244 | |
| 245 | <div class="memitem"> |
| 246 | <div class="memproto"> |
| 247 | <table class="mlabels"> |
| 248 | <tr> |
| 249 | <td class="mlabels-left"> |
| 250 | <table class="memname"> |
| 251 | <tr> |
| 252 | <td class="memname">const <a class="el" href="namespacearmnn_1_1profiling.html#af55bc6e5233a4720fe8a813db470b06f">Categories</a>& GetCategories </td> |
| 253 | <td>(</td> |
| 254 | <td class="paramname"></td><td>)</td> |
| 255 | <td> const</td> |
| 256 | </tr> |
| 257 | </table> |
| 258 | </td> |
| 259 | <td class="mlabels-right"> |
| 260 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 261 | </tr> |
| 262 | </table> |
| 263 | </div><div class="memdoc"> |
| 264 | |
| 265 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a718a75d4c178cf3f687b3f27b8f55091">ICounterDirectory</a>.</p> |
| 266 | |
| 267 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00059">59</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 268 | <div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> { <span class="keywordflow">return</span> m_Categories; }</div></div><!-- fragment --> |
| 269 | </div> |
| 270 | </div> |
| 271 | <a id="aab31f60f412b119002a465e13d5165f0"></a> |
| 272 | <h2 class="memtitle"><span class="permalink"><a href="#aab31f60f412b119002a465e13d5165f0">◆ </a></span>GetCategory()</h2> |
| 273 | |
| 274 | <div class="memitem"> |
| 275 | <div class="memproto"> |
| 276 | <table class="mlabels"> |
| 277 | <tr> |
| 278 | <td class="mlabels-left"> |
| 279 | <table class="memname"> |
| 280 | <tr> |
| 281 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_category.html">Category</a> * GetCategory </td> |
| 282 | <td>(</td> |
| 283 | <td class="paramtype">const std::string & </td> |
| 284 | <td class="paramname"><em>name</em></td><td>)</td> |
| 285 | <td> const</td> |
| 286 | </tr> |
| 287 | </table> |
| 288 | </td> |
| 289 | <td class="mlabels-right"> |
| 290 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 291 | </tr> |
| 292 | </table> |
| 293 | </div><div class="memdoc"> |
| 294 | |
| 295 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a90890aee41059d8fed244538acc4044f">ICounterDirectory</a>.</p> |
| 296 | |
| 297 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00425">425</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 298 | |
| 299 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>.</p> |
| 300 | <div class="fragment"><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> {</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keyword">auto</span> it = FindCategory(categoryName);</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="keywordflow">if</span> (it == m_Categories.end())</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  {</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  }</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span> </div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keyword">const</span> Category* category = it->get();</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  BOOST_ASSERT(category);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span> </div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">return</span> category;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> }</div></div><!-- fragment --> |
| 301 | </div> |
| 302 | </div> |
| 303 | <a id="a4626db62503c13042a745a40399f8317"></a> |
| 304 | <h2 class="memtitle"><span class="permalink"><a href="#a4626db62503c13042a745a40399f8317">◆ </a></span>GetCategoryCount()</h2> |
| 305 | |
| 306 | <div class="memitem"> |
| 307 | <div class="memproto"> |
| 308 | <table class="mlabels"> |
| 309 | <tr> |
| 310 | <td class="mlabels-left"> |
| 311 | <table class="memname"> |
| 312 | <tr> |
| 313 | <td class="memname">uint16_t GetCategoryCount </td> |
| 314 | <td>(</td> |
| 315 | <td class="paramname"></td><td>)</td> |
| 316 | <td> const</td> |
| 317 | </tr> |
| 318 | </table> |
| 319 | </td> |
| 320 | <td class="mlabels-right"> |
| 321 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 322 | </tr> |
| 323 | </table> |
| 324 | </div><div class="memdoc"> |
| 325 | |
| 326 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#ab43b0472c37fe51694977ae9b4132404">ICounterDirectory</a>.</p> |
| 327 | |
| 328 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00053">53</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 329 | |
| 330 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 331 | <div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> { <span class="keywordflow">return</span> boost::numeric_cast<uint16_t>(m_Categories.size()); }</div></div><!-- fragment --> |
| 332 | </div> |
| 333 | </div> |
| 334 | <a id="aefdd6df4feb698935d16311be966fda5"></a> |
| 335 | <h2 class="memtitle"><span class="permalink"><a href="#aefdd6df4feb698935d16311be966fda5">◆ </a></span>GetCounter()</h2> |
| 336 | |
| 337 | <div class="memitem"> |
| 338 | <div class="memproto"> |
| 339 | <table class="mlabels"> |
| 340 | <tr> |
| 341 | <td class="mlabels-left"> |
| 342 | <table class="memname"> |
| 343 | <tr> |
| 344 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_counter.html">Counter</a> * GetCounter </td> |
| 345 | <td>(</td> |
| 346 | <td class="paramtype">uint16_t </td> |
| 347 | <td class="paramname"><em>uid</em></td><td>)</td> |
| 348 | <td> const</td> |
| 349 | </tr> |
| 350 | </table> |
| 351 | </td> |
| 352 | <td class="mlabels-right"> |
| 353 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 354 | </tr> |
| 355 | </table> |
| 356 | </div><div class="memdoc"> |
| 357 | |
| 358 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a81881e3910b23455b46ec30c8420c695">ICounterDirectory</a>.</p> |
| 359 | |
| 360 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00469">469</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 361 | |
| 362 | <p class="reference">References <a class="el" href="_i_counter_directory_8hpp_source.html#l00130">Counter::m_MaxCounterUid</a>, and <a class="el" href="_i_counter_directory_8hpp_source.html#l00129">Counter::m_Uid</a>.</p> |
| 363 | |
| 364 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l01154">BOOST_AUTO_TEST_CASE()</a>, <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, and <a class="el" href="_counter_directory_8cpp_source.html#l00276">CounterDirectory::RegisterCounter()</a>.</p> |
| 365 | <div class="fragment"><div class="line"><a name="l00470"></a><span class="lineno"> 470</span> {</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keyword">auto</span> it = FindCounter(counterUid);</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">if</span> (it == m_Counters.end())</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  }</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span> </div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="keyword">const</span> Counter* counter = it->second.get();</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  BOOST_ASSERT(counter);</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  BOOST_ASSERT(counter->m_Uid <= counterUid);</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  BOOST_ASSERT(counter->m_Uid <= counter->m_MaxCounterUid);</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span> </div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  <span class="keywordflow">return</span> counter;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span> }</div></div><!-- fragment --> |
| 366 | </div> |
| 367 | </div> |
| 368 | <a id="ad9062caad1836f8e6b810e4e97bb19d1"></a> |
| 369 | <h2 class="memtitle"><span class="permalink"><a href="#ad9062caad1836f8e6b810e4e97bb19d1">◆ </a></span>GetCounterCount()</h2> |
| 370 | |
| 371 | <div class="memitem"> |
| 372 | <div class="memproto"> |
| 373 | <table class="mlabels"> |
| 374 | <tr> |
| 375 | <td class="mlabels-left"> |
| 376 | <table class="memname"> |
| 377 | <tr> |
| 378 | <td class="memname">uint16_t GetCounterCount </td> |
| 379 | <td>(</td> |
| 380 | <td class="paramname"></td><td>)</td> |
| 381 | <td> const</td> |
| 382 | </tr> |
| 383 | </table> |
| 384 | </td> |
| 385 | <td class="mlabels-right"> |
| 386 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 387 | </tr> |
| 388 | </table> |
| 389 | </div><div class="memdoc"> |
| 390 | |
| 391 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#acab78d0987a9cca5a9cac957be610a7d">ICounterDirectory</a>.</p> |
| 392 | |
| 393 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00056">56</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 394 | |
| 395 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_profiling_service_8cpp_source.html#l00208">ProfilingService::GetCounterCount()</a>.</p> |
| 396 | <div class="fragment"><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> { <span class="keywordflow">return</span> boost::numeric_cast<uint16_t>(m_Counters.size()); }</div></div><!-- fragment --> |
| 397 | </div> |
| 398 | </div> |
| 399 | <a id="a6d7f92b987338cab6cbfbad8d53a9738"></a> |
| 400 | <h2 class="memtitle"><span class="permalink"><a href="#a6d7f92b987338cab6cbfbad8d53a9738">◆ </a></span>GetCounters()</h2> |
| 401 | |
| 402 | <div class="memitem"> |
| 403 | <div class="memproto"> |
| 404 | <table class="mlabels"> |
| 405 | <tr> |
| 406 | <td class="mlabels-left"> |
| 407 | <table class="memname"> |
| 408 | <tr> |
| 409 | <td class="memname">const <a class="el" href="namespacearmnn_1_1profiling.html#aeeb6904ffbae435c8d0a7138427688f4">Counters</a>& GetCounters </td> |
| 410 | <td>(</td> |
| 411 | <td class="paramname"></td><td>)</td> |
| 412 | <td> const</td> |
| 413 | </tr> |
| 414 | </table> |
| 415 | </td> |
| 416 | <td class="mlabels-right"> |
| 417 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 418 | </tr> |
| 419 | </table> |
| 420 | </div><div class="memdoc"> |
| 421 | |
| 422 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#ad9fa9b8364fcaa2c940ef8e78eff8df2">ICounterDirectory</a>.</p> |
| 423 | |
| 424 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">62</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 425 | |
| 426 | <p class="reference">References <a class="el" href="_counter_directory_8cpp_source.html#l00534">CounterDirectory::Clear()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00425">CounterDirectory::GetCategory()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00469">CounterDirectory::GetCounter()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00454">CounterDirectory::GetCounterSet()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00439">CounterDirectory::GetDevice()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00485">CounterDirectory::IsCategoryRegistered()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00520">CounterDirectory::IsCounterRegistered()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00506">CounterDirectory::IsCounterSetRegistered()</a>, and <a class="el" href="_counter_directory_8cpp_source.html#l00492">CounterDirectory::IsDeviceRegistered()</a>.</p> |
| 427 | <div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> { <span class="keywordflow">return</span> m_Counters; }</div></div><!-- fragment --> |
| 428 | </div> |
| 429 | </div> |
| 430 | <a id="ad368fc6d788ff64cc25cafe2b40265c6"></a> |
| 431 | <h2 class="memtitle"><span class="permalink"><a href="#ad368fc6d788ff64cc25cafe2b40265c6">◆ </a></span>GetCounterSet()</h2> |
| 432 | |
| 433 | <div class="memitem"> |
| 434 | <div class="memproto"> |
| 435 | <table class="mlabels"> |
| 436 | <tr> |
| 437 | <td class="mlabels-left"> |
| 438 | <table class="memname"> |
| 439 | <tr> |
| 440 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_counter_set.html">CounterSet</a> * GetCounterSet </td> |
| 441 | <td>(</td> |
| 442 | <td class="paramtype">uint16_t </td> |
| 443 | <td class="paramname"><em>uid</em></td><td>)</td> |
| 444 | <td> const</td> |
| 445 | </tr> |
| 446 | </table> |
| 447 | </td> |
| 448 | <td class="mlabels-right"> |
| 449 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 450 | </tr> |
| 451 | </table> |
| 452 | </div><div class="memdoc"> |
| 453 | |
| 454 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a67693dcf840ffeadc066ce77ef7b2044">ICounterDirectory</a>.</p> |
| 455 | |
| 456 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00454">454</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 457 | |
| 458 | <p class="reference">References <a class="el" href="_i_counter_directory_8hpp_source.html#l00094">CounterSet::m_Uid</a>.</p> |
| 459 | |
| 460 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l01033">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>.</p> |
| 461 | <div class="fragment"><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> {</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keyword">auto</span> it = FindCounterSet(counterSetUid);</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="keywordflow">if</span> (it == m_CounterSets.end())</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  {</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  }</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span> </div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="keyword">const</span> CounterSet* counterSet = it->second.get();</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  BOOST_ASSERT(counterSet);</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  BOOST_ASSERT(counterSet->m_Uid == counterSetUid);</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span> </div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="keywordflow">return</span> counterSet;</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span> }</div></div><!-- fragment --> |
| 462 | </div> |
| 463 | </div> |
| 464 | <a id="ae3b7dbaa7317dacbcec25f30f6a16075"></a> |
| 465 | <h2 class="memtitle"><span class="permalink"><a href="#ae3b7dbaa7317dacbcec25f30f6a16075">◆ </a></span>GetCounterSetCount()</h2> |
| 466 | |
| 467 | <div class="memitem"> |
| 468 | <div class="memproto"> |
| 469 | <table class="mlabels"> |
| 470 | <tr> |
| 471 | <td class="mlabels-left"> |
| 472 | <table class="memname"> |
| 473 | <tr> |
| 474 | <td class="memname">uint16_t GetCounterSetCount </td> |
| 475 | <td>(</td> |
| 476 | <td class="paramname"></td><td>)</td> |
| 477 | <td> const</td> |
| 478 | </tr> |
| 479 | </table> |
| 480 | </td> |
| 481 | <td class="mlabels-right"> |
| 482 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 483 | </tr> |
| 484 | </table> |
| 485 | </div><div class="memdoc"> |
| 486 | |
| 487 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#aef59fdca57a5bb822e22cacfc5836fab">ICounterDirectory</a>.</p> |
| 488 | |
| 489 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00055">55</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 490 | |
| 491 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 492 | <div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> { <span class="keywordflow">return</span> boost::numeric_cast<uint16_t>(m_CounterSets.size()); }</div></div><!-- fragment --> |
| 493 | </div> |
| 494 | </div> |
| 495 | <a id="afcb72c4151fd72abfffcb7dae0ed2817"></a> |
| 496 | <h2 class="memtitle"><span class="permalink"><a href="#afcb72c4151fd72abfffcb7dae0ed2817">◆ </a></span>GetCounterSets()</h2> |
| 497 | |
| 498 | <div class="memitem"> |
| 499 | <div class="memproto"> |
| 500 | <table class="mlabels"> |
| 501 | <tr> |
| 502 | <td class="mlabels-left"> |
| 503 | <table class="memname"> |
| 504 | <tr> |
| 505 | <td class="memname">const <a class="el" href="namespacearmnn_1_1profiling.html#acfe20da73b5dc66439a65b49f04f7a21">CounterSets</a>& GetCounterSets </td> |
| 506 | <td>(</td> |
| 507 | <td class="paramname"></td><td>)</td> |
| 508 | <td> const</td> |
| 509 | </tr> |
| 510 | </table> |
| 511 | </td> |
| 512 | <td class="mlabels-right"> |
| 513 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 514 | </tr> |
| 515 | </table> |
| 516 | </div><div class="memdoc"> |
| 517 | |
| 518 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a8908490db3b8a0003a639ac56b956cee">ICounterDirectory</a>.</p> |
| 519 | |
| 520 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00061">61</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 521 | <div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> { <span class="keywordflow">return</span> m_CounterSets; }</div></div><!-- fragment --> |
| 522 | </div> |
| 523 | </div> |
| 524 | <a id="aa898e858d26d200fbc3788ac6d14fd90"></a> |
| 525 | <h2 class="memtitle"><span class="permalink"><a href="#aa898e858d26d200fbc3788ac6d14fd90">◆ </a></span>GetDevice()</h2> |
| 526 | |
| 527 | <div class="memitem"> |
| 528 | <div class="memproto"> |
| 529 | <table class="mlabels"> |
| 530 | <tr> |
| 531 | <td class="mlabels-left"> |
| 532 | <table class="memname"> |
| 533 | <tr> |
| 534 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_device.html">Device</a> * GetDevice </td> |
| 535 | <td>(</td> |
| 536 | <td class="paramtype">uint16_t </td> |
| 537 | <td class="paramname"><em>uid</em></td><td>)</td> |
| 538 | <td> const</td> |
| 539 | </tr> |
| 540 | </table> |
| 541 | </td> |
| 542 | <td class="mlabels-right"> |
| 543 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 544 | </tr> |
| 545 | </table> |
| 546 | </div><div class="memdoc"> |
| 547 | |
| 548 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a228989d3c53e86e779567ca5c2033ec2">ICounterDirectory</a>.</p> |
| 549 | |
| 550 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00439">439</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 551 | |
| 552 | <p class="reference">References <a class="el" href="_i_counter_directory_8hpp_source.html#l00078">Device::m_Uid</a>.</p> |
| 553 | |
| 554 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00918">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>.</p> |
| 555 | <div class="fragment"><div class="line"><a name="l00440"></a><span class="lineno"> 440</span> {</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keyword">auto</span> it = FindDevice(deviceUid);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">if</span> (it == m_Devices.end())</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  {</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  }</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span> </div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keyword">const</span> Device* device = it->second.get();</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  BOOST_ASSERT(device);</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  BOOST_ASSERT(device->m_Uid == deviceUid);</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span> </div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">return</span> device;</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> }</div></div><!-- fragment --> |
| 556 | </div> |
| 557 | </div> |
| 558 | <a id="ad742b37bc2beb568e083225f3fd8160b"></a> |
| 559 | <h2 class="memtitle"><span class="permalink"><a href="#ad742b37bc2beb568e083225f3fd8160b">◆ </a></span>GetDeviceCount()</h2> |
| 560 | |
| 561 | <div class="memitem"> |
| 562 | <div class="memproto"> |
| 563 | <table class="mlabels"> |
| 564 | <tr> |
| 565 | <td class="mlabels-left"> |
| 566 | <table class="memname"> |
| 567 | <tr> |
| 568 | <td class="memname">uint16_t GetDeviceCount </td> |
| 569 | <td>(</td> |
| 570 | <td class="paramname"></td><td>)</td> |
| 571 | <td> const</td> |
| 572 | </tr> |
| 573 | </table> |
| 574 | </td> |
| 575 | <td class="mlabels-right"> |
| 576 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 577 | </tr> |
| 578 | </table> |
| 579 | </div><div class="memdoc"> |
| 580 | |
| 581 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#aecd5912045fd41fe41dc96c9844f6deb">ICounterDirectory</a>.</p> |
| 582 | |
| 583 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00054">54</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 584 | |
| 585 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 586 | <div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> { <span class="keywordflow">return</span> boost::numeric_cast<uint16_t>(m_Devices.size()); }</div></div><!-- fragment --> |
| 587 | </div> |
| 588 | </div> |
| 589 | <a id="ac9bdbed464222fa06875096a4f373ca8"></a> |
| 590 | <h2 class="memtitle"><span class="permalink"><a href="#ac9bdbed464222fa06875096a4f373ca8">◆ </a></span>GetDevices()</h2> |
| 591 | |
| 592 | <div class="memitem"> |
| 593 | <div class="memproto"> |
| 594 | <table class="mlabels"> |
| 595 | <tr> |
| 596 | <td class="mlabels-left"> |
| 597 | <table class="memname"> |
| 598 | <tr> |
| 599 | <td class="memname">const <a class="el" href="namespacearmnn_1_1profiling.html#a3ff1066867cb9bd3b08338957c414401">Devices</a>& GetDevices </td> |
| 600 | <td>(</td> |
| 601 | <td class="paramname"></td><td>)</td> |
| 602 | <td> const</td> |
| 603 | </tr> |
| 604 | </table> |
| 605 | </td> |
| 606 | <td class="mlabels-right"> |
| 607 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 608 | </tr> |
| 609 | </table> |
| 610 | </div><div class="memdoc"> |
| 611 | |
| 612 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a98e6769cb933d30bfd3ca25f61bd8438">ICounterDirectory</a>.</p> |
| 613 | |
| 614 | <p class="definition">Definition at line <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00060">60</a> of file <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a>.</p> |
| 615 | <div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> { <span class="keywordflow">return</span> m_Devices; }</div></div><!-- fragment --> |
| 616 | </div> |
| 617 | </div> |
| 618 | <a id="a63fc4d050f681a84653c1d861e989f45"></a> |
| 619 | <h2 class="memtitle"><span class="permalink"><a href="#a63fc4d050f681a84653c1d861e989f45">◆ </a></span>IsCategoryRegistered()</h2> |
| 620 | |
| 621 | <div class="memitem"> |
| 622 | <div class="memproto"> |
| 623 | <table class="memname"> |
| 624 | <tr> |
| 625 | <td class="memname">bool IsCategoryRegistered </td> |
| 626 | <td>(</td> |
| 627 | <td class="paramtype">const std::string & </td> |
| 628 | <td class="paramname"><em>categoryName</em></td><td>)</td> |
| 629 | <td> const</td> |
| 630 | </tr> |
| 631 | </table> |
| 632 | </div><div class="memdoc"> |
| 633 | |
| 634 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00485">485</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 635 | |
| 636 | <p class="reference">Referenced by <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, <a class="el" href="_profiling_service_8cpp_source.html#l00290">ProfilingService::GetSendTimelinePacket()</a>, and <a class="el" href="_counter_directory_8cpp_source.html#l00021">CounterDirectory::RegisterCategory()</a>.</p> |
| 637 | <div class="fragment"><div class="line"><a name="l00486"></a><span class="lineno"> 486</span> {</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="keyword">auto</span> it = FindCategory(categoryName);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span> </div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keywordflow">return</span> it != m_Categories.end();</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span> }</div></div><!-- fragment --> |
| 638 | </div> |
| 639 | </div> |
| 640 | <a id="abd87d40b4a54b7e1625cb765768553b9"></a> |
| 641 | <h2 class="memtitle"><span class="permalink"><a href="#abd87d40b4a54b7e1625cb765768553b9">◆ </a></span>IsCounterRegistered() <span class="overload">[1/2]</span></h2> |
| 642 | |
| 643 | <div class="memitem"> |
| 644 | <div class="memproto"> |
| 645 | <table class="memname"> |
| 646 | <tr> |
| 647 | <td class="memname">bool IsCounterRegistered </td> |
| 648 | <td>(</td> |
| 649 | <td class="paramtype">uint16_t </td> |
| 650 | <td class="paramname"><em>counterUid</em></td><td>)</td> |
| 651 | <td> const</td> |
| 652 | </tr> |
| 653 | </table> |
| 654 | </div><div class="memdoc"> |
| 655 | |
| 656 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00520">520</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 657 | |
| 658 | <p class="reference">Referenced by <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, and <a class="el" href="_profiling_service_8cpp_source.html#l00290">ProfilingService::GetSendTimelinePacket()</a>.</p> |
| 659 | <div class="fragment"><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> {</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keyword">auto</span> it = FindCounter(counterUid);</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span> </div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  <span class="keywordflow">return</span> it != m_Counters.end();</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span> }</div></div><!-- fragment --> |
| 660 | </div> |
| 661 | </div> |
| 662 | <a id="a74ff6a2d9003a0713863df27450f42ed"></a> |
| 663 | <h2 class="memtitle"><span class="permalink"><a href="#a74ff6a2d9003a0713863df27450f42ed">◆ </a></span>IsCounterRegistered() <span class="overload">[2/2]</span></h2> |
| 664 | |
| 665 | <div class="memitem"> |
| 666 | <div class="memproto"> |
| 667 | <table class="memname"> |
| 668 | <tr> |
| 669 | <td class="memname">bool IsCounterRegistered </td> |
| 670 | <td>(</td> |
| 671 | <td class="paramtype">const std::string & </td> |
| 672 | <td class="paramname"><em>counterName</em></td><td>)</td> |
| 673 | <td> const</td> |
| 674 | </tr> |
| 675 | </table> |
| 676 | </div><div class="memdoc"> |
| 677 | |
| 678 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00527">527</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 679 | <div class="fragment"><div class="line"><a name="l00528"></a><span class="lineno"> 528</span> {</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="keyword">auto</span> it = FindCounter(counterName);</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span> </div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="keywordflow">return</span> it != m_Counters.end();</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span> }</div></div><!-- fragment --> |
| 680 | </div> |
| 681 | </div> |
| 682 | <a id="a38edfdaaf346b8b2ad60ba9ab591fdff"></a> |
| 683 | <h2 class="memtitle"><span class="permalink"><a href="#a38edfdaaf346b8b2ad60ba9ab591fdff">◆ </a></span>IsCounterSetRegistered() <span class="overload">[1/2]</span></h2> |
| 684 | |
| 685 | <div class="memitem"> |
| 686 | <div class="memproto"> |
| 687 | <table class="memname"> |
| 688 | <tr> |
| 689 | <td class="memname">bool IsCounterSetRegistered </td> |
| 690 | <td>(</td> |
| 691 | <td class="paramtype">uint16_t </td> |
| 692 | <td class="paramname"><em>counterSetUid</em></td><td>)</td> |
| 693 | <td> const</td> |
| 694 | </tr> |
| 695 | </table> |
| 696 | </div><div class="memdoc"> |
| 697 | |
| 698 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00506">506</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 699 | |
| 700 | <p class="reference">Referenced by <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00021">CounterDirectory::RegisterCategory()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00276">CounterDirectory::RegisterCounter()</a>, and <a class="el" href="_counter_directory_8cpp_source.html#l00180">CounterDirectory::RegisterCounterSet()</a>.</p> |
| 701 | <div class="fragment"><div class="line"><a name="l00507"></a><span class="lineno"> 507</span> {</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keyword">auto</span> it = FindCounterSet(counterSetUid);</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <span class="keywordflow">return</span> it != m_CounterSets.end();</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span> }</div></div><!-- fragment --> |
| 702 | </div> |
| 703 | </div> |
| 704 | <a id="a59397e9294a483953bdf682f16a8a3cd"></a> |
| 705 | <h2 class="memtitle"><span class="permalink"><a href="#a59397e9294a483953bdf682f16a8a3cd">◆ </a></span>IsCounterSetRegistered() <span class="overload">[2/2]</span></h2> |
| 706 | |
| 707 | <div class="memitem"> |
| 708 | <div class="memproto"> |
| 709 | <table class="memname"> |
| 710 | <tr> |
| 711 | <td class="memname">bool IsCounterSetRegistered </td> |
| 712 | <td>(</td> |
| 713 | <td class="paramtype">const std::string & </td> |
| 714 | <td class="paramname"><em>counterSetName</em></td><td>)</td> |
| 715 | <td> const</td> |
| 716 | </tr> |
| 717 | </table> |
| 718 | </div><div class="memdoc"> |
| 719 | |
| 720 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00513">513</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 721 | <div class="fragment"><div class="line"><a name="l00514"></a><span class="lineno"> 514</span> {</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  <span class="keyword">auto</span> it = FindCounterSet(counterSetName);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span> </div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">return</span> it != m_CounterSets.end();</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span> }</div></div><!-- fragment --> |
| 722 | </div> |
| 723 | </div> |
| 724 | <a id="a82cdaf1dbfea445bda6018760140ab50"></a> |
| 725 | <h2 class="memtitle"><span class="permalink"><a href="#a82cdaf1dbfea445bda6018760140ab50">◆ </a></span>IsDeviceRegistered() <span class="overload">[1/2]</span></h2> |
| 726 | |
| 727 | <div class="memitem"> |
| 728 | <div class="memproto"> |
| 729 | <table class="memname"> |
| 730 | <tr> |
| 731 | <td class="memname">bool IsDeviceRegistered </td> |
| 732 | <td>(</td> |
| 733 | <td class="paramtype">uint16_t </td> |
| 734 | <td class="paramname"><em>deviceUid</em></td><td>)</td> |
| 735 | <td> const</td> |
| 736 | </tr> |
| 737 | </table> |
| 738 | </div><div class="memdoc"> |
| 739 | |
| 740 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00492">492</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 741 | |
| 742 | <p class="reference">Referenced by <a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html#l00062">CounterDirectory::GetCounters()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00021">CounterDirectory::RegisterCategory()</a>, and <a class="el" href="_counter_directory_8cpp_source.html#l00084">CounterDirectory::RegisterDevice()</a>.</p> |
| 743 | <div class="fragment"><div class="line"><a name="l00493"></a><span class="lineno"> 493</span> {</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="keyword">auto</span> it = FindDevice(deviceUid);</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span> </div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <span class="keywordflow">return</span> it != m_Devices.end();</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span> }</div></div><!-- fragment --> |
| 744 | </div> |
| 745 | </div> |
| 746 | <a id="ae1e135cd44b3b612ded4decaed61ae1b"></a> |
| 747 | <h2 class="memtitle"><span class="permalink"><a href="#ae1e135cd44b3b612ded4decaed61ae1b">◆ </a></span>IsDeviceRegistered() <span class="overload">[2/2]</span></h2> |
| 748 | |
| 749 | <div class="memitem"> |
| 750 | <div class="memproto"> |
| 751 | <table class="memname"> |
| 752 | <tr> |
| 753 | <td class="memname">bool IsDeviceRegistered </td> |
| 754 | <td>(</td> |
| 755 | <td class="paramtype">const std::string & </td> |
| 756 | <td class="paramname"><em>deviceName</em></td><td>)</td> |
| 757 | <td> const</td> |
| 758 | </tr> |
| 759 | </table> |
| 760 | </div><div class="memdoc"> |
| 761 | |
| 762 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00499">499</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 763 | <div class="fragment"><div class="line"><a name="l00500"></a><span class="lineno"> 500</span> {</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <span class="keyword">auto</span> it = FindDevice(deviceName);</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span> </div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  <span class="keywordflow">return</span> it != m_Devices.end();</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span> }</div></div><!-- fragment --> |
| 764 | </div> |
| 765 | </div> |
| 766 | <a id="aaa547e84c90dc8dc30ac1115a7556124"></a> |
| 767 | <h2 class="memtitle"><span class="permalink"><a href="#aaa547e84c90dc8dc30ac1115a7556124">◆ </a></span>RegisterCategory()</h2> |
| 768 | |
| 769 | <div class="memitem"> |
| 770 | <div class="memproto"> |
| 771 | <table class="mlabels"> |
| 772 | <tr> |
| 773 | <td class="mlabels-left"> |
| 774 | <table class="memname"> |
| 775 | <tr> |
| 776 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_category.html">Category</a> * RegisterCategory </td> |
| 777 | <td>(</td> |
| 778 | <td class="paramtype">const std::string & </td> |
| 779 | <td class="paramname"><em>categoryName</em>, </td> |
| 780 | </tr> |
| 781 | <tr> |
| 782 | <td class="paramkey"></td> |
| 783 | <td></td> |
| 784 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > & </td> |
| 785 | <td class="paramname"><em>deviceUid</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code>, </td> |
| 786 | </tr> |
| 787 | <tr> |
| 788 | <td class="paramkey"></td> |
| 789 | <td></td> |
| 790 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > & </td> |
| 791 | <td class="paramname"><em>counterSetUid</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code> </td> |
| 792 | </tr> |
| 793 | <tr> |
| 794 | <td></td> |
| 795 | <td>)</td> |
| 796 | <td></td><td></td> |
| 797 | </tr> |
| 798 | </table> |
| 799 | </td> |
| 800 | <td class="mlabels-right"> |
| 801 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 802 | </tr> |
| 803 | </table> |
| 804 | </div><div class="memdoc"> |
| 805 | |
| 806 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html#a4e6bfd22b99c6f43e2d1cd4784664501">ICounterRegistry</a>.</p> |
| 807 | |
| 808 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00021">21</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 809 | |
| 810 | <p class="reference">References <a class="el" href="_optional_8hpp_source.html#l00053">OptionalBase::has_value()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00485">CounterDirectory::IsCategoryRegistered()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00506">CounterDirectory::IsCounterSetRegistered()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00492">CounterDirectory::IsDeviceRegistered()</a>, and <a class="el" href="_optional_8hpp_source.html#l00146">OptionalReferenceSwitch< std::is_reference< T >::value, T >::value()</a>.</p> |
| 811 | |
| 812 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_profiling_service_8cpp_source.html#l00290">ProfilingService::GetSendTimelinePacket()</a>.</p> |
| 813 | <div class="fragment"><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> {</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="comment">// Check that the given category name is valid</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keywordflow">if</span> (categoryName.empty() ||</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  !IsValidSwTraceString<SwTraceNameCharPolicy>(categoryName))</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a category with an invalid name"</span>);</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  }</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">// Check that the given category is not already registered</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a63fc4d050f681a84653c1d861e989f45">IsCategoryRegistered</a>(categoryName))</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  boost::str(boost::format(<span class="stringliteral">"Trying to register a category already registered (\"%1%\")"</span>)</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  % categoryName));</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="comment">// Check that a device with the given (optional) UID is already registered</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  uint16_t deviceUidValue = deviceUid.has_value() ? deviceUid.value() : 0;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">if</span> (deviceUidValue > 0)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="comment">// Check that the (optional) device is already registered</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a82cdaf1dbfea445bda6018760140ab50">IsDeviceRegistered</a>(deviceUidValue))</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a category (\"%1%\") to a device that is "</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="stringliteral">"not registered (UID %2%)"</span>)</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  % categoryName</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  % deviceUidValue));</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// Check that a counter set with the given (optional) UID is already registered</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  uint16_t counterSetUidValue = counterSetUid.has_value() ? counterSetUid.value() : 0;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">if</span> (counterSetUidValue > 0)</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="comment">// Check that the (optional) counter set is already registered</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">IsCounterSetRegistered</a>(counterSetUidValue))</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a category (name: \"%1%\") to a counter set "</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="stringliteral">"that is not registered (UID: %2%)"</span>)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  % categoryName</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  % counterSetUidValue));</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  }</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="comment">// Create the category</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">CategoryPtr</a> category = std::make_unique<Category>(categoryName, deviceUidValue, counterSetUidValue);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  BOOST_ASSERT(category);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// Get the raw category pointer</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">const</span> Category* categoryPtr = category.get();</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  BOOST_ASSERT(categoryPtr);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">// Register the category</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  m_Categories.insert(std::move(category));</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">return</span> categoryPtr;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a63fc4d050f681a84653c1d861e989f45"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a63fc4d050f681a84653c1d861e989f45">armnn::profiling::CounterDirectory::IsCategoryRegistered</a></div><div class="ttdeci">bool IsCategoryRegistered(const std::string &categoryName) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00485">CounterDirectory.cpp:485</a></div></div> |
| 814 | <div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a38edfdaaf346b8b2ad60ba9ab591fdff"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">armnn::profiling::CounterDirectory::IsCounterSetRegistered</a></div><div class="ttdeci">bool IsCounterSetRegistered(uint16_t counterSetUid) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00506">CounterDirectory.cpp:506</a></div></div> |
| 815 | <div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a82cdaf1dbfea445bda6018760140ab50"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a82cdaf1dbfea445bda6018760140ab50">armnn::profiling::CounterDirectory::IsDeviceRegistered</a></div><div class="ttdeci">bool IsDeviceRegistered(uint16_t deviceUid) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00492">CounterDirectory.cpp:492</a></div></div> |
| 816 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a8adee535828386656b4c8acfa8bcf871"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">armnn::profiling::CategoryPtr</a></div><div class="ttdeci">std::unique_ptr< Category > CategoryPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00031">ICounterDirectory.hpp:31</a></div></div> |
| 817 | </div><!-- fragment --> |
| 818 | </div> |
| 819 | </div> |
| 820 | <a id="ab9756dfaf9b36cc51262369a27d1384f"></a> |
| 821 | <h2 class="memtitle"><span class="permalink"><a href="#ab9756dfaf9b36cc51262369a27d1384f">◆ </a></span>RegisterCounter()</h2> |
| 822 | |
| 823 | <div class="memitem"> |
| 824 | <div class="memproto"> |
| 825 | <table class="mlabels"> |
| 826 | <tr> |
| 827 | <td class="mlabels-left"> |
| 828 | <table class="memname"> |
| 829 | <tr> |
| 830 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_counter.html">Counter</a> * RegisterCounter </td> |
| 831 | <td>(</td> |
| 832 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> & </td> |
| 833 | <td class="paramname"><em>backendId</em>, </td> |
| 834 | </tr> |
| 835 | <tr> |
| 836 | <td class="paramkey"></td> |
| 837 | <td></td> |
| 838 | <td class="paramtype">const uint16_t </td> |
| 839 | <td class="paramname"><em>uid</em>, </td> |
| 840 | </tr> |
| 841 | <tr> |
| 842 | <td class="paramkey"></td> |
| 843 | <td></td> |
| 844 | <td class="paramtype">const std::string & </td> |
| 845 | <td class="paramname"><em>parentCategoryName</em>, </td> |
| 846 | </tr> |
| 847 | <tr> |
| 848 | <td class="paramkey"></td> |
| 849 | <td></td> |
| 850 | <td class="paramtype">uint16_t </td> |
| 851 | <td class="paramname"><em>counterClass</em>, </td> |
| 852 | </tr> |
| 853 | <tr> |
| 854 | <td class="paramkey"></td> |
| 855 | <td></td> |
| 856 | <td class="paramtype">uint16_t </td> |
| 857 | <td class="paramname"><em>interpolation</em>, </td> |
| 858 | </tr> |
| 859 | <tr> |
| 860 | <td class="paramkey"></td> |
| 861 | <td></td> |
| 862 | <td class="paramtype">double </td> |
| 863 | <td class="paramname"><em>multiplier</em>, </td> |
| 864 | </tr> |
| 865 | <tr> |
| 866 | <td class="paramkey"></td> |
| 867 | <td></td> |
| 868 | <td class="paramtype">const std::string & </td> |
| 869 | <td class="paramname"><em>name</em>, </td> |
| 870 | </tr> |
| 871 | <tr> |
| 872 | <td class="paramkey"></td> |
| 873 | <td></td> |
| 874 | <td class="paramtype">const std::string & </td> |
| 875 | <td class="paramname"><em>description</em>, </td> |
| 876 | </tr> |
| 877 | <tr> |
| 878 | <td class="paramkey"></td> |
| 879 | <td></td> |
| 880 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > & </td> |
| 881 | <td class="paramname"><em>units</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code>, </td> |
| 882 | </tr> |
| 883 | <tr> |
| 884 | <td class="paramkey"></td> |
| 885 | <td></td> |
| 886 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > & </td> |
| 887 | <td class="paramname"><em>numberOfCores</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code>, </td> |
| 888 | </tr> |
| 889 | <tr> |
| 890 | <td class="paramkey"></td> |
| 891 | <td></td> |
| 892 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > & </td> |
| 893 | <td class="paramname"><em>deviceUid</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code>, </td> |
| 894 | </tr> |
| 895 | <tr> |
| 896 | <td class="paramkey"></td> |
| 897 | <td></td> |
| 898 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< uint16_t > & </td> |
| 899 | <td class="paramname"><em>counterSetUid</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code> </td> |
| 900 | </tr> |
| 901 | <tr> |
| 902 | <td></td> |
| 903 | <td>)</td> |
| 904 | <td></td><td></td> |
| 905 | </tr> |
| 906 | </table> |
| 907 | </td> |
| 908 | <td class="mlabels-right"> |
| 909 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 910 | </tr> |
| 911 | </table> |
| 912 | </div><div class="memdoc"> |
| 913 | |
| 914 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html#a1d4c2bc2310f063afdf3691f3228012f">ICounterRegistry</a>.</p> |
| 915 | |
| 916 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00276">276</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 917 | |
| 918 | <p class="reference">References <a class="el" href="_counter_directory_8cpp_source.html#l00469">CounterDirectory::GetCounter()</a>, <a class="el" href="_profiling_utils_8cpp_source.html#l00074">armnn::profiling::GetNextCounterUids()</a>, <a class="el" href="_optional_8hpp_source.html#l00053">OptionalBase::has_value()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00506">CounterDirectory::IsCounterSetRegistered()</a>, <a class="el" href="_i_counter_directory_8hpp_source.html#l00134">Counter::m_Name</a>, and <a class="el" href="_optional_8hpp_source.html#l00146">OptionalReferenceSwitch< std::is_reference< T >::value, T >::value()</a>.</p> |
| 919 | |
| 920 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l01154">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_profiling_service_8cpp_source.html#l00290">ProfilingService::GetSendTimelinePacket()</a>.</p> |
| 921 | <div class="fragment"><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> {</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  boost::ignore_unused(backendId);</div><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="comment">// Check that the given parent category name is valid</span></div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">if</span> (parentCategoryName.empty() ||</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  !IsValidSwTraceString<SwTraceNameCharPolicy>(parentCategoryName))</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  {</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid parent category name"</span>);</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="comment">// Check that the given class is valid</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordflow">if</span> (counterClass != 0 && counterClass != 1)</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  {</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid class"</span>);</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  }</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="comment">// Check that the given interpolation is valid</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">if</span> (interpolation != 0 && interpolation != 1)</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid interpolation"</span>);</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  }</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> </div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="comment">// Check that the given multiplier is valid</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordflow">if</span> (multiplier == .0f)</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  {</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid multiplier"</span>);</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  }</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> </div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="comment">// Check that the given name is valid</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">if</span> (name.empty() ||</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  !IsValidSwTraceString<SwTraceCharPolicy>(name))</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  {</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid name"</span>);</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  }</div><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>  <span class="comment">// Check that the given description is valid</span></div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="keywordflow">if</span> (description.empty() ||</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  !IsValidSwTraceString<SwTraceCharPolicy>(description))</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  {</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with an invalid description"</span>);</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</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>  <span class="comment">// Check that the given units are valid</span></div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="keywordflow">if</span> (units.has_value()</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  && !IsValidSwTraceString<SwTraceNameCharPolicy>(units.value()))</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  {</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter with a invalid units"</span>);</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  }</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> </div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="comment">// Check that the given parent category is registered</span></div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keyword">auto</span> categoryIt = FindCategory(parentCategoryName);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="keywordflow">if</span> (categoryIt == m_Categories.end())</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  {</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a counter to a category "</span></div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="stringliteral">"that is not registered (name: \"%1%\")"</span>)</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  % parentCategoryName));</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  }</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span> </div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="comment">// Get the parent category</span></div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">CategoryPtr</a>& parentCategory = *categoryIt;</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  BOOST_ASSERT(parentCategory);</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">// Check that a counter with the given name is not already registered within the parent category</span></div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keyword">const</span> std::vector<uint16_t>& parentCategoryCounters = parentCategory->m_Counters;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordflow">for</span> (uint16_t parentCategoryCounterUid : parentCategoryCounters)</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  {</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <span class="keyword">const</span> Counter* parentCategoryCounter = <a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#aefdd6df4feb698935d16311be966fda5">GetCounter</a>(parentCategoryCounterUid);</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  BOOST_ASSERT(parentCategoryCounter);</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span> </div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="keywordflow">if</span> (parentCategoryCounter->m_Name == name)</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  {</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  boost::str(boost::format(<span class="stringliteral">"Trying to register a counter to category \"%1%\" with a name that "</span></div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="stringliteral">"is already used within that category (name: \"%2%\")"</span>)</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  % parentCategoryName</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  % name));</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  }</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  }</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> </div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="comment">// Check that a counter set with the given (optional) UID is already registered</span></div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  uint16_t counterSetUidValue = counterSetUid.has_value() ? counterSetUid.value() : 0;</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keywordflow">if</span> (counterSetUidValue > 0)</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  {</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="comment">// Check that the (optional) counter set is already registered</span></div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">IsCounterSetRegistered</a>(counterSetUidValue))</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  {</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a counter to a counter set that is "</span></div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="stringliteral">"not registered (counter set UID: %1%)"</span>)</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  % counterSetUidValue));</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  }</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span> </div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <span class="comment">// Get the number of cores (this call may throw)</span></div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  uint16_t deviceUidValue = deviceUid.has_value() ? deviceUid.value() : 0;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  uint16_t deviceCores = GetNumberOfCores(numberOfCores, deviceUidValue, parentCategory);</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span> </div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="comment">// Get the counter UIDs and calculate the max counter UID</span></div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  std::vector<uint16_t> counterUids = <a class="code" href="namespacearmnn_1_1profiling.html#a6605c82bc625fbd40f24d35edee15fe3">GetNextCounterUids</a>(uid, deviceCores);</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  BOOST_ASSERT(!counterUids.empty());</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  uint16_t maxCounterUid = deviceCores <= 1 ? counterUids.front() : counterUids.back();</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="comment">// Get the counter units</span></div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="keyword">const</span> std::string unitsValue = units.has_value() ? units.value() : <span class="stringliteral">""</span>;</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span> </div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="comment">// Create the counter</span></div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="namespacearmnn_1_1profiling.html#a38de53725b010ce63ea7557bb1d270e7">CounterPtr</a> counter = std::make_shared<Counter>(armnn::profiling::BACKEND_ID,</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  counterUids.front(),</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  maxCounterUid,</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  counterClass,</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  interpolation,</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  multiplier,</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  name,</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  description,</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  unitsValue,</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  deviceUidValue,</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  counterSetUidValue);</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  BOOST_ASSERT(counter);</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> </div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="comment">// Get the raw counter pointer</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keyword">const</span> Counter* counterPtr = counter.get();</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  BOOST_ASSERT(counterPtr);</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span> </div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="comment">// Process multiple counters if necessary</span></div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="keywordflow">for</span> (uint16_t counterUid : counterUids)</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  {</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="comment">// Connect the counter to the parent category</span></div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  parentCategory->m_Counters.push_back(counterUid);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="comment">// Register the counter</span></div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  m_Counters.insert(std::make_pair(counterUid, counter));</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  }</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> </div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="keywordflow">return</span> counterPtr;</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a38edfdaaf346b8b2ad60ba9ab591fdff"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">armnn::profiling::CounterDirectory::IsCounterSetRegistered</a></div><div class="ttdeci">bool IsCounterSetRegistered(uint16_t counterSetUid) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00506">CounterDirectory.cpp:506</a></div></div> |
| 922 | <div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_aefdd6df4feb698935d16311be966fda5"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#aefdd6df4feb698935d16311be966fda5">armnn::profiling::CounterDirectory::GetCounter</a></div><div class="ttdeci">const Counter * GetCounter(uint16_t uid) const override</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00469">CounterDirectory.cpp:469</a></div></div> |
| 923 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a6605c82bc625fbd40f24d35edee15fe3"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a6605c82bc625fbd40f24d35edee15fe3">armnn::profiling::GetNextCounterUids</a></div><div class="ttdeci">std::vector< uint16_t > GetNextCounterUids(uint16_t firstUid, uint16_t cores)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_utils_8cpp_source.html#l00074">ProfilingUtils.cpp:74</a></div></div> |
| 924 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a38de53725b010ce63ea7557bb1d270e7"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a38de53725b010ce63ea7557bb1d270e7">armnn::profiling::CounterPtr</a></div><div class="ttdeci">std::shared_ptr< Counter > CounterPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00034">ICounterDirectory.hpp:34</a></div></div> |
| 925 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a8adee535828386656b4c8acfa8bcf871"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">armnn::profiling::CategoryPtr</a></div><div class="ttdeci">std::unique_ptr< Category > CategoryPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00031">ICounterDirectory.hpp:31</a></div></div> |
| 926 | </div><!-- fragment --> |
| 927 | </div> |
| 928 | </div> |
| 929 | <a id="a161604d904508d5b86b459c2c2ace4be"></a> |
| 930 | <h2 class="memtitle"><span class="permalink"><a href="#a161604d904508d5b86b459c2c2ace4be">◆ </a></span>RegisterCounterSet()</h2> |
| 931 | |
| 932 | <div class="memitem"> |
| 933 | <div class="memproto"> |
| 934 | <table class="mlabels"> |
| 935 | <tr> |
| 936 | <td class="mlabels-left"> |
| 937 | <table class="memname"> |
| 938 | <tr> |
| 939 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_counter_set.html">CounterSet</a> * RegisterCounterSet </td> |
| 940 | <td>(</td> |
| 941 | <td class="paramtype">const std::string & </td> |
| 942 | <td class="paramname"><em>counterSetName</em>, </td> |
| 943 | </tr> |
| 944 | <tr> |
| 945 | <td class="paramkey"></td> |
| 946 | <td></td> |
| 947 | <td class="paramtype">uint16_t </td> |
| 948 | <td class="paramname"><em>count</em> = <code>0</code>, </td> |
| 949 | </tr> |
| 950 | <tr> |
| 951 | <td class="paramkey"></td> |
| 952 | <td></td> |
| 953 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > & </td> |
| 954 | <td class="paramname"><em>parentCategoryName</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code> </td> |
| 955 | </tr> |
| 956 | <tr> |
| 957 | <td></td> |
| 958 | <td>)</td> |
| 959 | <td></td><td></td> |
| 960 | </tr> |
| 961 | </table> |
| 962 | </td> |
| 963 | <td class="mlabels-right"> |
| 964 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 965 | </tr> |
| 966 | </table> |
| 967 | </div><div class="memdoc"> |
| 968 | |
| 969 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html#a0338e5b744c9c2d08143cf70d319940f">ICounterRegistry</a>.</p> |
| 970 | |
| 971 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00180">180</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 972 | |
| 973 | <p class="reference">References <a class="el" href="_profiling_utils_8cpp_source.html#l00054">armnn::profiling::GetNextUid()</a>, <a class="el" href="_optional_8hpp_source.html#l00053">OptionalBase::has_value()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00506">CounterDirectory::IsCounterSetRegistered()</a>, <a class="el" href="_i_counter_directory_8hpp_source.html#l00064">Category::m_CounterSetUid</a>, and <a class="el" href="_optional_8hpp_source.html#l00146">OptionalReferenceSwitch< std::is_reference< T >::value, T >::value()</a>.</p> |
| 974 | |
| 975 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 976 | <div class="fragment"><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> {</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="comment">// Check that the given counter set name is valid</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">if</span> (counterSetName.empty() ||</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  !IsValidSwTraceString<SwTraceNameCharPolicy>(counterSetName))</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  {</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a counter set with an invalid name"</span>);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> </div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// Check that a counter set with the given name is not already registered</span></div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">IsCounterSetRegistered</a>(counterSetName))</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  {</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  boost::str(boost::format(<span class="stringliteral">"Trying to register a counter set already registered (\"%1%\")"</span>)</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  % counterSetName));</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  }</div><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>  <span class="comment">// Peek the next UID, do not get an actual valid UID just now as we don't want to waste a good UID in case</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="comment">// the registration fails. We'll get a proper one once we're sure that the counter set can be registered</span></div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  uint16_t counterSetUidPeek = <a class="code" href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">GetNextUid</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// Check that a category with the given (optional) parent category name is already registered</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  Category* parentCategoryPtr = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">if</span> (parentCategoryName.has_value())</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  {</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// Get the (optional) parent category name</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keyword">const</span> std::string& parentCategoryNameValue = parentCategoryName.value();</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">if</span> (parentCategoryNameValue.empty())</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  {</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a counter set (UID: %1%) to an invalid "</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="stringliteral">"parent category (name: \"%2%\")"</span>)</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  % counterSetUidPeek</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  % parentCategoryNameValue));</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  }</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="comment">// Check that the given parent category is already registered</span></div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keyword">auto</span> it = FindCategory(parentCategoryNameValue);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">if</span> (it == m_Categories.end())</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  {</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a counter set (UID: %1%) to a parent category "</span></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="stringliteral">"that is not registered (name: \"%2%\")"</span>)</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  % counterSetUidPeek</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  % parentCategoryNameValue));</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div><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>  <span class="comment">// Get the parent category</span></div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">CategoryPtr</a>& parentCategory = *it;</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  BOOST_ASSERT(parentCategory);</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="comment">// Check that the given parent category is not already connected to another counter set</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">if</span> (parentCategory->m_CounterSetUid != 0 && parentCategory->m_CounterSetUid != counterSetUidPeek)</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a counter set (UID: %1%) to a parent category "</span></div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="stringliteral">"that is already connected to a different counter set "</span></div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="stringliteral">"(category \"%2%\" connected to counter set %3%)"</span>)</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  % counterSetUidPeek</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  % parentCategoryNameValue</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  % parentCategory->m_CounterSetUid));</div><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> </div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="comment">// The parent category can be associated to the counter set that is about to be registered.</span></div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="comment">// Get the raw pointer to the parent category (to be used later when the counter set is actually been</span></div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">// registered, to make sure that the category is associated to an existing counter set)</span></div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  parentCategoryPtr = parentCategory.get();</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span> </div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="comment">// Get the counter set UID</span></div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  uint16_t counterSetUid = <a class="code" href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">GetNextUid</a>();</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  BOOST_ASSERT(counterSetUid == counterSetUidPeek);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="comment">// Create the counter set</span></div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="namespacearmnn_1_1profiling.html#abaedc7fcb8ecb2e086482afe10737fb7">CounterSetPtr</a> counterSet = std::make_unique<CounterSet>(counterSetUid, counterSetName, count);</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  BOOST_ASSERT(counterSet);</div><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">// Get the raw counter set pointer</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keyword">const</span> CounterSet* counterSetPtr = counterSet.get();</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  BOOST_ASSERT(counterSetPtr);</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="comment">// Register the counter set</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  m_CounterSets.insert(std::make_pair(counterSetUid, std::move(counterSet)));</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> </div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="comment">// Connect the counter set to the parent category, if required</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">if</span> (parentCategoryPtr)</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  {</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="comment">// Set the counter set UID in the parent category</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  parentCategoryPtr->m_CounterSetUid = counterSetUid;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  }</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> </div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="keywordflow">return</span> counterSetPtr;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span> }</div><div class="ttc" id="namespacearmnn_1_1profiling_html_abaedc7fcb8ecb2e086482afe10737fb7"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#abaedc7fcb8ecb2e086482afe10737fb7">armnn::profiling::CounterSetPtr</a></div><div class="ttdeci">std::unique_ptr< CounterSet > CounterSetPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00033">ICounterDirectory.hpp:33</a></div></div> |
| 977 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a982b094fe2faa67a3560cdaf3901d0f8"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">armnn::profiling::GetNextUid</a></div><div class="ttdeci">uint16_t GetNextUid(bool peekOnly)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_utils_8cpp_source.html#l00054">ProfilingUtils.cpp:54</a></div></div> |
| 978 | <div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a38edfdaaf346b8b2ad60ba9ab591fdff"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a38edfdaaf346b8b2ad60ba9ab591fdff">armnn::profiling::CounterDirectory::IsCounterSetRegistered</a></div><div class="ttdeci">bool IsCounterSetRegistered(uint16_t counterSetUid) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00506">CounterDirectory.cpp:506</a></div></div> |
| 979 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a8adee535828386656b4c8acfa8bcf871"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">armnn::profiling::CategoryPtr</a></div><div class="ttdeci">std::unique_ptr< Category > CategoryPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00031">ICounterDirectory.hpp:31</a></div></div> |
| 980 | </div><!-- fragment --> |
| 981 | </div> |
| 982 | </div> |
| 983 | <a id="a6ec101239653ba9260e1362c5381e81d"></a> |
| 984 | <h2 class="memtitle"><span class="permalink"><a href="#a6ec101239653ba9260e1362c5381e81d">◆ </a></span>RegisterDevice()</h2> |
| 985 | |
| 986 | <div class="memitem"> |
| 987 | <div class="memproto"> |
| 988 | <table class="mlabels"> |
| 989 | <tr> |
| 990 | <td class="mlabels-left"> |
| 991 | <table class="memname"> |
| 992 | <tr> |
| 993 | <td class="memname">const <a class="el" href="classarmnn_1_1profiling_1_1_device.html">Device</a> * RegisterDevice </td> |
| 994 | <td>(</td> |
| 995 | <td class="paramtype">const std::string & </td> |
| 996 | <td class="paramname"><em>deviceName</em>, </td> |
| 997 | </tr> |
| 998 | <tr> |
| 999 | <td class="paramkey"></td> |
| 1000 | <td></td> |
| 1001 | <td class="paramtype">uint16_t </td> |
| 1002 | <td class="paramname"><em>cores</em> = <code>0</code>, </td> |
| 1003 | </tr> |
| 1004 | <tr> |
| 1005 | <td class="paramkey"></td> |
| 1006 | <td></td> |
| 1007 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_optional.html">Optional</a>< std::string > & </td> |
| 1008 | <td class="paramname"><em>parentCategoryName</em> = <code><a class="el" href="structarmnn_1_1_empty_optional.html">EmptyOptional</a>()</code> </td> |
| 1009 | </tr> |
| 1010 | <tr> |
| 1011 | <td></td> |
| 1012 | <td>)</td> |
| 1013 | <td></td><td></td> |
| 1014 | </tr> |
| 1015 | </table> |
| 1016 | </td> |
| 1017 | <td class="mlabels-right"> |
| 1018 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 1019 | </tr> |
| 1020 | </table> |
| 1021 | </div><div class="memdoc"> |
| 1022 | |
| 1023 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_registry.html#a552c43eab6a2ba99f68f98802631db8e">ICounterRegistry</a>.</p> |
| 1024 | |
| 1025 | <p class="definition">Definition at line <a class="el" href="_counter_directory_8cpp_source.html#l00084">84</a> of file <a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a>.</p> |
| 1026 | |
| 1027 | <p class="reference">References <a class="el" href="_profiling_utils_8cpp_source.html#l00054">armnn::profiling::GetNextUid()</a>, <a class="el" href="_optional_8hpp_source.html#l00053">OptionalBase::has_value()</a>, <a class="el" href="_counter_directory_8cpp_source.html#l00492">CounterDirectory::IsDeviceRegistered()</a>, <a class="el" href="_i_counter_directory_8hpp_source.html#l00063">Category::m_DeviceUid</a>, and <a class="el" href="_optional_8hpp_source.html#l00146">OptionalReferenceSwitch< std::is_reference< T >::value, T >::value()</a>.</p> |
| 1028 | |
| 1029 | <p class="reference">Referenced by <a class="el" href="_profiling_tests_8cpp_source.html#l00762">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 1030 | <div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> {</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// Check that the given device name is valid</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">if</span> (deviceName.empty() ||</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  !IsValidSwTraceString<SwTraceCharPolicy>(deviceName))</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Trying to register a device with an invalid name"</span>);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">// Check that a device with the given name is not already registered</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1profiling_1_1_counter_directory.html#a82cdaf1dbfea445bda6018760140ab50">IsDeviceRegistered</a>(deviceName))</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  boost::str(boost::format(<span class="stringliteral">"Trying to register a device already registered (\"%1%\")"</span>)</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  % deviceName));</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">// Peek the next UID, do not get an actual valid UID just now as we don't want to waste a good UID in case</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// the registration fails. We'll get a proper one once we're sure that the device can be registered</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  uint16_t deviceUidPeek = <a class="code" href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">GetNextUid</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// Check that a category with the given (optional) parent category name is already registered</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  Category* parentCategoryPtr = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (parentCategoryName.has_value())</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="comment">// Get the (optional) parent category name</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keyword">const</span> std::string& parentCategoryNameValue = parentCategoryName.value();</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordflow">if</span> (parentCategoryNameValue.empty())</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a device (name: \"%1%\") to an invalid "</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="stringliteral">"parent category (name: \"%2%\")"</span>)</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  % deviceName</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  % parentCategoryNameValue));</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="comment">// Check that the given parent category is already registered</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keyword">auto</span> categoryIt = FindCategory(parentCategoryNameValue);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">if</span> (categoryIt == m_Categories.end())</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a device (name: \"%1%\") to a parent category that "</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="stringliteral">"is not registered (name: \"%2%\")"</span>)</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  % deviceName</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  % parentCategoryNameValue));</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> </div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="comment">// Get the parent category</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">CategoryPtr</a>& parentCategory = *categoryIt;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  BOOST_ASSERT(parentCategory);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="comment">// Check that the given parent category is not already connected to another device</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (parentCategory->m_DeviceUid != 0 && parentCategory->m_DeviceUid != deviceUidPeek)</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  {</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">throw</span> InvalidArgumentException(</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  boost::str(boost::format(<span class="stringliteral">"Trying to connect a device (UID: %1%) to a parent category that is "</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="stringliteral">"already connected to a different device "</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="stringliteral">"(category \"%2%\" connected to device %3%)"</span>)</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  % deviceUidPeek</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  % parentCategoryNameValue</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  % parentCategory->m_DeviceUid));</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="comment">// The parent category can be associated to the device that is about to be registered.</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// Get the raw pointer to the parent category (to be used later when the device is actually been</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// registered, to make sure that the category is associated to an existing device)</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  parentCategoryPtr = parentCategory.get();</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// Get the device UID</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  uint16_t deviceUid = <a class="code" href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">GetNextUid</a>();</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  BOOST_ASSERT(deviceUid == deviceUidPeek);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="comment">// Create the device</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="namespacearmnn_1_1profiling.html#a22a0d730c0d08335585e6e8999be8f8b">DevicePtr</a> device = std::make_unique<Device>(deviceUid, deviceName, cores);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  BOOST_ASSERT(device);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// Get the raw device pointer</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keyword">const</span> Device* devicePtr = device.get();</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  BOOST_ASSERT(devicePtr);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="comment">// Register the device</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  m_Devices.insert(std::make_pair(deviceUid, std::move(device)));</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="comment">// Connect the device to the parent category, if required</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (parentCategoryPtr)</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  {</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="comment">// Set the device UID in the parent category</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  parentCategoryPtr->m_DeviceUid = deviceUid;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">return</span> devicePtr;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> }</div><div class="ttc" id="namespacearmnn_1_1profiling_html_a982b094fe2faa67a3560cdaf3901d0f8"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a982b094fe2faa67a3560cdaf3901d0f8">armnn::profiling::GetNextUid</a></div><div class="ttdeci">uint16_t GetNextUid(bool peekOnly)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_utils_8cpp_source.html#l00054">ProfilingUtils.cpp:54</a></div></div> |
| 1031 | <div class="ttc" id="classarmnn_1_1profiling_1_1_counter_directory_html_a82cdaf1dbfea445bda6018760140ab50"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_counter_directory.html#a82cdaf1dbfea445bda6018760140ab50">armnn::profiling::CounterDirectory::IsDeviceRegistered</a></div><div class="ttdeci">bool IsDeviceRegistered(uint16_t deviceUid) const</div><div class="ttdef"><b>Definition:</b> <a href="_counter_directory_8cpp_source.html#l00492">CounterDirectory.cpp:492</a></div></div> |
| 1032 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a8adee535828386656b4c8acfa8bcf871"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a8adee535828386656b4c8acfa8bcf871">armnn::profiling::CategoryPtr</a></div><div class="ttdeci">std::unique_ptr< Category > CategoryPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00031">ICounterDirectory.hpp:31</a></div></div> |
| 1033 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a22a0d730c0d08335585e6e8999be8f8b"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a22a0d730c0d08335585e6e8999be8f8b">armnn::profiling::DevicePtr</a></div><div class="ttdeci">std::unique_ptr< Device > DevicePtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_counter_directory_8hpp_source.html#l00032">ICounterDirectory.hpp:32</a></div></div> |
| 1034 | </div><!-- fragment --> |
| 1035 | </div> |
| 1036 | </div> |
| 1037 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 1038 | <li>src/profiling/<a class="el" href="src_2profiling_2_counter_directory_8hpp_source.html">CounterDirectory.hpp</a></li> |
| 1039 | <li>src/profiling/<a class="el" href="_counter_directory_8cpp_source.html">CounterDirectory.cpp</a></li> |
| 1040 | </ul> |
| 1041 | </div><!-- contents --> |
| 1042 | </div><!-- doc-content --> |
| 1043 | <!-- start footer part --> |
| 1044 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 1045 | <ul> |
| 1046 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1profiling.html">profiling</a></li><li class="navelem"><a class="el" href="classarmnn_1_1profiling_1_1_counter_directory.html">CounterDirectory</a></li> |
| 1047 | <li class="footer">Generated on Fri Mar 13 2020 16:07:06 for ArmNN by |
| 1048 | <a href="http://www.doxygen.org/index.html"> |
| 1049 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 1050 | </ul> |
| 1051 | </div> |
| 1052 | </body> |
| 1053 | </html> |