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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.8"/>
<title>Hardware Locality (hwloc): Building Custom Topologies</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 style="padding-left: 0.5em;">
<div id="projectname">Hardware Locality (hwloc)
 <span id="projectnumber">1.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Building Custom Topologies</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:ga58220f648a972140865d11940bccec81"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ga58220f648a972140865d11940bccec81">hwloc_custom_insert_topology</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> newtopology, <a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> newparent, <a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> oldtopology, <a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> oldroot)</td></tr>
<tr class="separator:ga58220f648a972140865d11940bccec81"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga60c404d4f0544e1070f549af8be6bd73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00083.html#ga60c404d4f0544e1070f549af8be6bd73">hwloc_custom_insert_group_object_by_parent</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> parent, int groupdepth)</td></tr>
<tr class="separator:ga60c404d4f0544e1070f549af8be6bd73"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A custom topology may be initialized by calling <a class="el" href="a00077.html#gad1f15795219e2c3ca6d44ba0db604c4f" title="Prepare the topology for custom assembly. ">hwloc_topology_set_custom()</a> after <a class="el" href="a00076.html#ga03fd4a16d8b9ee1ffc32b25fd2f6bdfa" title="Allocate a topology context. ">hwloc_topology_init()</a>. It may then be modified by inserting objects or entire topologies. Once done assembling, <a class="el" href="a00076.html#gabdf58d87ad77f6615fccdfe0535ff826" title="Build the actual topology. ">hwloc_topology_load()</a> should be invoked as usual to finalize the topology. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga60c404d4f0544e1070f549af8be6bd73"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_custom_insert_group_object_by_parent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00076.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="a00075.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">int </td>
<td class="paramname"><em>groupdepth</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert a new group object inside a custom topology. </p>
<p>An object with type <a class="el" href="a00074.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56" title="Group objects. Objects which do not fit in the above but are detected by hwloc and are useful to take...">HWLOC_OBJ_GROUP</a> is inserted as a new child of object <code>parent</code>.</p>
<p><code>groupdepth</code> is the depth attribute to be given to the new object. It may for instance be 0 for top-level groups, 1 for their children, and so on.</p>
<p>The custom topology <code>newtopology</code> must have been prepared with <a class="el" href="a00077.html#gad1f15795219e2c3ca6d44ba0db604c4f" title="Prepare the topology for custom assembly. ">hwloc_topology_set_custom()</a> and not loaded with <a class="el" href="a00076.html#gabdf58d87ad77f6615fccdfe0535ff826" title="Build the actual topology. ">hwloc_topology_load()</a> yet.</p>
<p><code>parent</code> may be either the root of <code>topology</code> or an object that was added earlier through <a class="el" href="a00083.html#ga60c404d4f0544e1070f549af8be6bd73" title="Insert a new group object inside a custom topology. ">hwloc_custom_insert_group_object_by_parent()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The cpuset and nodeset of the new group object are NULL because these sets are meaningless when assembling multiple topologies.</dd>
<dd>
The cpuset and nodeset of the <code>parent</code> object are not modified. </dd></dl>
</div>
</div>
<a class="anchor" id="ga58220f648a972140865d11940bccec81"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int hwloc_custom_insert_topology </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> </td>
<td class="paramname"><em>newtopology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>newparent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> </td>
<td class="paramname"><em>oldtopology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00075.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td>
<td class="paramname"><em>oldroot</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Insert an existing topology inside a custom topology. </p>
<p>Duplicate the existing topology <code>oldtopology</code> inside a new custom topology <code>newtopology</code> as a leaf of object <code>newparent</code>.</p>
<p>If <code>oldroot</code> is not <code>NULL</code>, duplicate <code>oldroot</code> and all its children instead of the entire <code>oldtopology</code>. Passing the root object of <code>oldtopology</code> in <code>oldroot</code> is equivalent to passing <code>NULL</code>.</p>
<p>The custom topology <code>newtopology</code> must have been prepared with <a class="el" href="a00077.html#gad1f15795219e2c3ca6d44ba0db604c4f" title="Prepare the topology for custom assembly. ">hwloc_topology_set_custom()</a> and not loaded with <a class="el" href="a00076.html#gabdf58d87ad77f6615fccdfe0535ff826" title="Build the actual topology. ">hwloc_topology_load()</a> yet.</p>
<p><code>newparent</code> may be either the root of <code>newtopology</code> or an object that was added through <a class="el" href="a00083.html#ga60c404d4f0544e1070f549af8be6bd73" title="Insert a new group object inside a custom topology. ">hwloc_custom_insert_group_object_by_parent()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The cpuset and nodeset of the <code>newparent</code> object are not modified based on the contents of <code>oldtopology</code>. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Oct 7 2014 11:56:52 for Hardware Locality (hwloc) by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
|