1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Hardware Locality (hwloc): Components and Plugins: Core functions to be used by components</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Hardware Locality (hwloc)
 <span id="projectnumber">2.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Components and Plugins: Core functions to be used by components</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab527c1e0f243f057d31a724794ad9f88"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gab527c1e0f243f057d31a724794ad9f88">hwloc_hide_errors</a> (void)</td></tr>
<tr class="separator:gab527c1e0f243f057d31a724794ad9f88"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1e105cfe3c8e77f34cc6df3841deebbc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga1e105cfe3c8e77f34cc6df3841deebbc">hwloc__insert_object_by_cpuset</a> (struct hwloc_topology *topology, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> root, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj, const char *reason)</td></tr>
<tr class="separator:ga1e105cfe3c8e77f34cc6df3841deebbc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0ef97debde503b56367689b07bb3e901"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga0ef97debde503b56367689b07bb3e901">hwloc_insert_object_by_parent</a> (struct hwloc_topology *topology, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> parent, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr>
<tr class="separator:ga0ef97debde503b56367689b07bb3e901"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0b5c75b2dc37cea2e8a29c4812baf4b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga0b5c75b2dc37cea2e8a29c4812baf4b3">hwloc_alloc_setup_object</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00190.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned os_index)</td></tr>
<tr class="separator:ga0b5c75b2dc37cea2e8a29c4812baf4b3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga754b61041ceee9685534a2c5d3cd0156"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga754b61041ceee9685534a2c5d3cd0156">hwloc_obj_add_children_sets</a> (<a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr>
<tr class="separator:ga754b61041ceee9685534a2c5d3cd0156"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga120d8bd74922e1030b621409a6b0be61"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#ga120d8bd74922e1030b621409a6b0be61">hwloc_topology_reconnect</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned long flags)</td></tr>
<tr class="separator:ga120d8bd74922e1030b621409a6b0be61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac2eaed287bb215cf0bd33014e9e1d374"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00236.html#gac2eaed287bb215cf0bd33014e9e1d374">hwloc_plugin_check_namespace</a> (const char *pluginname, const char *symbol)</td></tr>
<tr class="separator:gac2eaed287bb215cf0bd33014e9e1d374"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga1e105cfe3c8e77f34cc6df3841deebbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1e105cfe3c8e77f34cc6df3841deebbc">◆ </a></span>hwloc__insert_object_by_cpuset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc__insert_object_by_cpuset </td>
<td>(</td>
<td class="paramtype">struct hwloc_topology * </td>
<td class="paramname"><em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>root</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>reason</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add an object to the topology. </p>
<p>Insert new object <code>obj</code> in the topology starting under existing object <code>root</code> (if <code>NULL</code>, the topology root object is used).</p>
<p>It is sorted along the tree of other objects according to the inclusion of cpusets, to eventually be added as a child of the smallest object including this object.</p>
<p>If the cpuset is empty, the type of the object (and maybe some attributes) must be enough to find where to insert the object. This is especially true for NUMA nodes with memory and no CPUs.</p>
<p>The given object should not have children.</p>
<p>This shall only be called before levels are built.</p>
<p>The caller should check whether the object type is filtered-out before calling this function.</p>
<p>The topology cpuset/nodesets will be enlarged to include the object sets.</p>
<p><code>reason</code> is a unique string identifying where and why this insertion call was performed (it will be displayed in case of internal insertion error).</p>
<p>Returns the object on success. Returns NULL and frees obj on error. Returns another object and frees obj if it was merged with an identical pre-existing object. </p>
</div>
</div>
<a id="ga0b5c75b2dc37cea2e8a29c4812baf4b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0b5c75b2dc37cea2e8a29c4812baf4b3">◆ </a></span>hwloc_alloc_setup_object()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_alloc_setup_object </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> </td>
<td class="paramname"><em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00190.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>os_index</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocate and initialize an object of the given type and physical index. </p>
<p>If <code>os_index</code> is unknown or irrelevant, use <code>HWLOC_UNKNOWN_INDEX</code>. </p>
</div>
</div>
<a id="gab527c1e0f243f057d31a724794ad9f88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab527c1e0f243f057d31a724794ad9f88">◆ </a></span>hwloc_hide_errors()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hwloc_hide_errors </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check whether insertion errors are hidden. </p>
</div>
</div>
<a id="ga0ef97debde503b56367689b07bb3e901"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0ef97debde503b56367689b07bb3e901">◆ </a></span>hwloc_insert_object_by_parent()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void hwloc_insert_object_by_parent </td>
<td>(</td>
<td class="paramtype">struct hwloc_topology * </td>
<td class="paramname"><em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>obj</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert an object somewhere in the topology. </p>
<p>It is added as the last child of the given parent. The cpuset is completely ignored, so strange objects such as I/O devices should preferably be inserted with this.</p>
<p>When used for "normal" children with cpusets (when importing from XML when duplicating a topology), the caller should make sure that:</p><ul>
<li>children are inserted in order,</li>
<li>children cpusets do not intersect.</li>
</ul>
<p>The given object may have normal, I/O or Misc children, as long as they are in order as well. These children must have valid parent and next_sibling pointers.</p>
<p>The caller should check whether the object type is filtered-out before calling this function. </p>
</div>
</div>
<a id="ga754b61041ceee9685534a2c5d3cd0156"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga754b61041ceee9685534a2c5d3cd0156">◆ </a></span>hwloc_obj_add_children_sets()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hwloc_obj_add_children_sets </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Setup object cpusets/nodesets by OR'ing its children. </p>
<p>Used when adding an object late in the topology. Will update the new object by OR'ing all its new children sets.</p>
<p>Used when PCI backend adds a hostbridge parent, when distances add a new Group, etc. </p>
</div>
</div>
<a id="gac2eaed287bb215cf0bd33014e9e1d374"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac2eaed287bb215cf0bd33014e9e1d374">◆ </a></span>hwloc_plugin_check_namespace()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int hwloc_plugin_check_namespace </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>pluginname</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>symbol</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Make sure that plugins can lookup core symbols. </p>
<p>This is a sanity check to avoid lazy-lookup failures when libhwloc is loaded within a plugin, and later tries to load its own plugins. This may fail (and abort the program) if libhwloc symbols are in a private namespace.</p>
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd>
<dd>
-1 if the plugin cannot be successfully loaded. The caller plugin init() callback should return a negative error code as well.</dd></dl>
<p>Plugins should call this function in their init() callback to avoid later crashes if lazy symbol resolution is used by the upper layer that loaded hwloc (e.g. OpenCL implementations using dlopen with RTLD_LAZY).</p>
<dl class="section note"><dt>Note</dt><dd>The build system must define HWLOC_INSIDE_PLUGIN if and only if building the caller as a plugin.</dd>
<dd>
This function should remain inline so plugins can call it even when they cannot find libhwloc symbols. </dd></dl>
</div>
</div>
<a id="ga120d8bd74922e1030b621409a6b0be61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga120d8bd74922e1030b621409a6b0be61">◆ </a></span>hwloc_topology_reconnect()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hwloc_topology_reconnect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> </td>
<td class="paramname"><em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long </td>
<td class="paramname"><em>flags</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Request a reconnection of children and levels in the topology. </p>
<p>May be used by backends during discovery if they need arrays or lists of object within levels or children to be fully connected.</p>
<p><code>flags</code> is currently unused, must 0. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
|