Debian Codegraph @

doc/doxygen-doc/html/a00181.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
6 <meta name="generator" content="Doxygen 1.15.0"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>Hardware Locality (hwloc): Looking at Ancestor and Child Objects</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 <script type="text/javascript" src="clipboard.js"></script>
13 <link href="doxygen.css" rel="stylesheet" type="text/css" />
14 </head>
15 <body>
16 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
17 <div id="titlearea">
18 <table cellspacing="0" cellpadding="0">
19 <tbody>
20 <tr id="projectrow">
21 <td id="projectalign">
22 <div id="projectname">Hardware Locality (hwloc)<span id="projectnumber">&#160;2.14.0</span>
23 </div>
24 </td>
25 </tr>
26 </tbody>
27 </table>
28 </div>
29 <!-- end header part -->
30 <!-- Generated by Doxygen 1.15.0 -->
31 <script type="text/javascript">
32 $(function() { codefold.init(); });
33 </script>
34 <script type="text/javascript" src="menudata.js"></script>
35 <script type="text/javascript" src="menu.js"></script>
36 <script type="text/javascript">
37 $(function() {
38 initMenu('',false,false,'search.php','Search',false);
39 });
40 </script>
41 <div id="main-nav"></div>
42 </div><!-- top -->
43 <div id="doc-content">
44 <div class="header">
45 <div class="summary">
46 <a href="#func-members">Functions</a> </div>
47 <div class="headertitle"><div class="title">Looking at Ancestor and Child Objects </div></div>
48 </div><!--header-->
49 <div class="contents">
50 <table class="memberdecls">
51 <tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
52 Functions</h2></td></tr>
53 <tr class="memitem:ga92df7facf12aa88034188c8cdaa8cbb2" id="r_ga92df7facf12aa88034188c8cdaa8cbb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga92df7facf12aa88034188c8cdaa8cbb2">hwloc_get_ancestor_obj_by_depth</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int depth, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr>
54 <tr class="memitem:ga83b74cd28eea89492a69990d99b8eac7" id="r_ga83b74cd28eea89492a69990d99b8eac7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga83b74cd28eea89492a69990d99b8eac7">hwloc_get_ancestor_obj_by_type</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00167.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj)</td></tr>
55 <tr class="memitem:gab41b927d770fe2bd6517956a941e67b9" id="r_gab41b927d770fe2bd6517956a941e67b9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gab41b927d770fe2bd6517956a941e67b9">hwloc_get_common_ancestor_obj</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj1, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj2)</td></tr>
56 <tr class="memitem:ga73b13ad130668db552ae2aadac80cd3c" id="r_ga73b13ad130668db552ae2aadac80cd3c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga73b13ad130668db552ae2aadac80cd3c">hwloc_obj_is_in_subtree</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> obj, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> subtree_root)</td></tr>
57 <tr class="memitem:ga761c8e824b0ffaa8ea416c761fd70bdc" id="r_ga761c8e824b0ffaa8ea416c761fd70bdc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga761c8e824b0ffaa8ea416c761fd70bdc">hwloc_get_next_child</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> parent, <a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> prev)</td></tr>
58 </table>
59 <a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
60 <p>Be sure to see the figure in <a class="el" href="a00371.html">Terms and Definitions</a> that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one package has fewer caches than its peers. </p>
61 <a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
62 <a id="ga92df7facf12aa88034188c8cdaa8cbb2" name="ga92df7facf12aa88034188c8cdaa8cbb2"></a>
63 <h2 class="memtitle"><span class="permalink"><a href="#ga92df7facf12aa88034188c8cdaa8cbb2">&#9670;&#160;</a></span>hwloc_get_ancestor_obj_by_depth()</h2>
64
65 <div class="memitem">
66 <div class="memproto">
67 <table class="mlabels">
68 <tr>
69 <td class="mlabels-left">
70 <table class="memname">
71 <tr>
72 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_get_ancestor_obj_by_depth </td>
73 <td>(</td>
74 <td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td>
75 </tr>
76 <tr>
77 <td class="paramkey"></td>
78 <td></td>
79 <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>depth</em></span>, </td>
80 </tr>
81 <tr>
82 <td class="paramkey"></td>
83 <td></td>
84 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span>&#160;)</td>
85 </tr>
86 </table>
87 </td>
88 <td class="mlabels-right">
89 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
90 </tr>
91 </table>
92 </div><div class="memdoc">
93
94 <p>Returns the ancestor object of <code class="param">obj</code> at depth <code class="param">depth</code>. </p>
95 <dl class="section return"><dt>Returns</dt><dd>the ancestor if any. </dd>
96 <dd>
97 <code>NULL</code> if no such ancestor exists.</dd></dl>
98 <dl class="section note"><dt>Note</dt><dd><code class="param">depth</code> should not be the depth of PU or NUMA objects since they are ancestors of no objects (except Misc or I/O). This function rather expects an intermediate level depth, such as the depth of Packages, Cores, or Caches. </dd></dl>
99
100 </div>
101 </div>
102 <a id="ga83b74cd28eea89492a69990d99b8eac7" name="ga83b74cd28eea89492a69990d99b8eac7"></a>
103 <h2 class="memtitle"><span class="permalink"><a href="#ga83b74cd28eea89492a69990d99b8eac7">&#9670;&#160;</a></span>hwloc_get_ancestor_obj_by_type()</h2>
104
105 <div class="memitem">
106 <div class="memproto">
107 <table class="mlabels">
108 <tr>
109 <td class="mlabels-left">
110 <table class="memname">
111 <tr>
112 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_get_ancestor_obj_by_type </td>
113 <td>(</td>
114 <td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td>
115 </tr>
116 <tr>
117 <td class="paramkey"></td>
118 <td></td>
119 <td class="paramtype"><a class="el" href="a00167.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a></td> <td class="paramname"><span class="paramname"><em>type</em></span>, </td>
120 </tr>
121 <tr>
122 <td class="paramkey"></td>
123 <td></td>
124 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span>&#160;)</td>
125 </tr>
126 </table>
127 </td>
128 <td class="mlabels-right">
129 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
130 </tr>
131 </table>
132 </div><div class="memdoc">
133
134 <p>Returns the ancestor object of <code class="param">obj</code> with type <code class="param">type</code>. </p>
135 <dl class="section return"><dt>Returns</dt><dd>the ancestor if any. </dd>
136 <dd>
137 <code>NULL</code> if no such ancestor exists.</dd></dl>
138 <dl class="section note"><dt>Note</dt><dd>if multiple matching ancestors exist (e.g. multiple levels of <a class="el" href="a00167.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>) the lowest one is returned.</dd>
139 <dd>
140 <code class="param">type</code> should not be <a class="el" href="a00167.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with some other logical ...">HWLOC_OBJ_PU</a> or <a class="el" href="a00167.html#ggacd37bb612667dc437d66bfb175a8dc55a9d917a3e5497950c6d8948b8e183db5a" title="NUMA node. An object that contains memory that is directly and byte-accessible to the host processors...">HWLOC_OBJ_NUMANODE</a> since these objects are ancestors of no objects (except Misc or I/O). This function rather expects an intermediate object type, such as <a class="el" href="a00167.html#ggacd37bb612667dc437d66bfb175a8dc55ab16ab8c0dbffc234921d86f3dfb63129" title="Physical package. The physical package that usually gets inserted into a socket on the motherboard....">HWLOC_OBJ_PACKAGE</a>, <a class="el" href="a00167.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" title="Core. A computation unit (may be shared by several PUs, aka logical processors).">HWLOC_OBJ_CORE</a>, etc. </dd></dl>
141
142 </div>
143 </div>
144 <a id="gab41b927d770fe2bd6517956a941e67b9" name="gab41b927d770fe2bd6517956a941e67b9"></a>
145 <h2 class="memtitle"><span class="permalink"><a href="#gab41b927d770fe2bd6517956a941e67b9">&#9670;&#160;</a></span>hwloc_get_common_ancestor_obj()</h2>
146
147 <div class="memitem">
148 <div class="memproto">
149 <table class="mlabels">
150 <tr>
151 <td class="mlabels-left">
152 <table class="memname">
153 <tr>
154 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_get_common_ancestor_obj </td>
155 <td>(</td>
156 <td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj1</em></span>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj2</em></span>&#160;)</td>
167 </tr>
168 </table>
169 </td>
170 <td class="mlabels-right">
171 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
172 </tr>
173 </table>
174 </div><div class="memdoc">
175
176 <p>Returns the common parent object to objects <code class="param">obj1</code> and <code class="param">obj2</code>. </p>
177 <dl class="section return"><dt>Returns</dt><dd>the common ancestor.</dd></dl>
178 <dl class="section note"><dt>Note</dt><dd>This function cannot return <code>NULL</code>. </dd></dl>
179
180 </div>
181 </div>
182 <a id="ga761c8e824b0ffaa8ea416c761fd70bdc" name="ga761c8e824b0ffaa8ea416c761fd70bdc"></a>
183 <h2 class="memtitle"><span class="permalink"><a href="#ga761c8e824b0ffaa8ea416c761fd70bdc">&#9670;&#160;</a></span>hwloc_get_next_child()</h2>
184
185 <div class="memitem">
186 <div class="memproto">
187 <table class="mlabels">
188 <tr>
189 <td class="mlabels-left">
190 <table class="memname">
191 <tr>
192 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_get_next_child </td>
193 <td>(</td>
194 <td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td>
195 </tr>
196 <tr>
197 <td class="paramkey"></td>
198 <td></td>
199 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>parent</em></span>, </td>
200 </tr>
201 <tr>
202 <td class="paramkey"></td>
203 <td></td>
204 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>prev</em></span>&#160;)</td>
205 </tr>
206 </table>
207 </td>
208 <td class="mlabels-right">
209 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
210 </tr>
211 </table>
212 </div><div class="memdoc">
213
214 <p>Return the next child. </p>
215 <p>Return the next child among the normal children list, then among the memory children list, then among the I/O children list, then among the Misc children list.</p>
216 <dl class="section return"><dt>Returns</dt><dd>the first child if <code class="param">prev</code> is <code>NULL</code>. </dd>
217 <dd>
218 the next child if <code class="param">prev</code> is not <code>NULL</code>. </dd>
219 <dd>
220 <code>NULL</code> when there is no next child. </dd></dl>
221
222 </div>
223 </div>
224 <a id="ga73b13ad130668db552ae2aadac80cd3c" name="ga73b13ad130668db552ae2aadac80cd3c"></a>
225 <h2 class="memtitle"><span class="permalink"><a href="#ga73b13ad130668db552ae2aadac80cd3c">&#9670;&#160;</a></span>hwloc_obj_is_in_subtree()</h2>
226
227 <div class="memitem">
228 <div class="memproto">
229 <table class="mlabels">
230 <tr>
231 <td class="mlabels-left">
232 <table class="memname">
233 <tr>
234 <td class="memname">int hwloc_obj_is_in_subtree </td>
235 <td>(</td>
236 <td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td>
237 </tr>
238 <tr>
239 <td class="paramkey"></td>
240 <td></td>
241 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>obj</em></span>, </td>
242 </tr>
243 <tr>
244 <td class="paramkey"></td>
245 <td></td>
246 <td class="paramtype"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td> <td class="paramname"><span class="paramname"><em>subtree_root</em></span>&#160;)</td>
247 </tr>
248 </table>
249 </td>
250 <td class="mlabels-right">
251 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
252 </tr>
253 </table>
254 </div><div class="memdoc">
255
256 <p>Returns true if <code class="param">obj</code> is inside the subtree beginning with ancestor object <code class="param">subtree_root</code>. </p>
257 <dl class="section return"><dt>Returns</dt><dd>1 is the object is in the subtree, 0 otherwise.</dd></dl>
258 <dl class="section note"><dt>Note</dt><dd>This function cannot work if <code class="param">obj</code> and <code class="param">subtree_root</code> objects do not have CPU sets (I/O or Misc objects). </dd></dl>
259
260 </div>
261 </div>
262 </div><!-- contents -->
263 <!-- start footer part -->
264 <hr class="footer"/><address class="footer"><small>
265 Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0
266 </small></address>
267 </div><!-- doc-content -->
268 </body>
269 </html>