| 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): Topology differences</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"> 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="#nested-classes">Data Structures</a> | |
| 47 |
<a href="#typedef-members">Typedefs</a> | |
| 48 |
<a href="#enum-members">Enumerations</a> | |
| 49 |
<a href="#func-members">Functions</a> </div> |
| 50 |
<div class="headertitle"><div class="title">Topology differences </div></div> |
| 51 |
</div><!--header--> |
| 52 |
<div class="contents"> |
| 53 |
<table class="memberdecls"> |
| 54 |
<tr class="heading"><td colspan="2"><h2 id="header-nested-classes" class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
| 55 |
Data Structures</h2></td></tr> |
| 56 |
<tr class="memitem:hwloc_5Ftopology_5Fdiff_5Fobj_5Fattr_5Fu" id="r_hwloc_5Ftopology_5Fdiff_5Fobj_5Fattr_5Fu"><td class="memItemLeft" align="right" valign="top">union  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00324.html">hwloc_topology_diff_obj_attr_u</a></td></tr> |
| 57 |
<tr class="memitem:hwloc_5Ftopology_5Fdiff_5Fu" id="r_hwloc_5Ftopology_5Fdiff_5Fu"><td class="memItemLeft" align="right" valign="top">union  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00340.html">hwloc_topology_diff_u</a></td></tr> |
| 58 |
</table><table class="memberdecls"> |
| 59 |
<tr class="heading"><td colspan="2"><h2 id="header-typedef-members" class="groupheader"><a id="typedef-members" name="typedef-members"></a> |
| 60 |
Typedefs</h2></td></tr> |
| 61 |
<tr class="memitem:ga74a3fefbaa17582fea86d76b312d6254" id="r_ga74a3fefbaa17582fea86d76b312d6254"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="#ga86f044210b0a9e9fa83acbdbbf7e05fd">hwloc_topology_diff_obj_attr_type_e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga74a3fefbaa17582fea86d76b312d6254">hwloc_topology_diff_obj_attr_type_t</a></td></tr> |
| 62 |
<tr class="memitem:ga8470f631b7365c839d3e40d38c5b6291" id="r_ga8470f631b7365c839d3e40d38c5b6291"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="#ga38b28b7423b85a3321e6d0062d5f83d0">hwloc_topology_diff_type_e</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8470f631b7365c839d3e40d38c5b6291">hwloc_topology_diff_type_t</a></td></tr> |
| 63 |
<tr class="memitem:ga1bd6363f26f7961f83153aaa484a9b85" id="r_ga1bd6363f26f7961f83153aaa484a9b85"><td class="memItemLeft" align="right" valign="top">typedef union <a class="el" href="a00340.html">hwloc_topology_diff_u</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td></tr> |
| 64 |
</table><table class="memberdecls"> |
| 65 |
<tr class="heading"><td colspan="2"><h2 id="header-enum-members" class="groupheader"><a id="enum-members" name="enum-members"></a> |
| 66 |
Enumerations</h2></td></tr> |
| 67 |
<tr class="memitem:ga86f044210b0a9e9fa83acbdbbf7e05fd" id="r_ga86f044210b0a9e9fa83acbdbbf7e05fd"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga86f044210b0a9e9fa83acbdbbf7e05fd">hwloc_topology_diff_obj_attr_type_e</a> { <a class="el" href="#gga86f044210b0a9e9fa83acbdbbf7e05fdabc7f0c7ed0b6864e902f4b70f2c7bc94">HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE</a> |
| 68 |
, <a class="el" href="#gga86f044210b0a9e9fa83acbdbbf7e05fda94a8f37c51d62d15ac6192665dd49310">HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME</a> |
| 69 |
, <a class="el" href="#gga86f044210b0a9e9fa83acbdbbf7e05fda63430bf932434bc456282f636d39c2c2">HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO</a> |
| 70 |
}</td></tr> |
| 71 |
<tr class="memitem:ga38b28b7423b85a3321e6d0062d5f83d0" id="r_ga38b28b7423b85a3321e6d0062d5f83d0"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga38b28b7423b85a3321e6d0062d5f83d0">hwloc_topology_diff_type_e</a> { <a class="el" href="#gga38b28b7423b85a3321e6d0062d5f83d0accbcaee230f79989debb284c8626f0c0">HWLOC_TOPOLOGY_DIFF_OBJ_ATTR</a> |
| 72 |
, <a class="el" href="#gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147">HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX</a> |
| 73 |
}</td></tr> |
| 74 |
<tr class="memitem:gada4c1273ce020afaf02b649496f7edf5" id="r_gada4c1273ce020afaf02b649496f7edf5"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#gada4c1273ce020afaf02b649496f7edf5">hwloc_topology_diff_apply_flags_e</a> { <a class="el" href="#ggada4c1273ce020afaf02b649496f7edf5a821a160512d67ea0dd05dab873d2fc54">HWLOC_TOPOLOGY_DIFF_APPLY_REVERSE</a> |
| 75 |
}</td></tr> |
| 76 |
</table><table class="memberdecls"> |
| 77 |
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a> |
| 78 |
Functions</h2></td></tr> |
| 79 |
<tr class="memitem:ga8a1754f69fbb31364ea3ea2c39827c9f" id="r_ga8a1754f69fbb31364ea3ea2c39827c9f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8a1754f69fbb31364ea3ea2c39827c9f">hwloc_topology_diff_build</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> newtopology, unsigned long flags, <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *diff)</td></tr> |
| 80 |
<tr class="memitem:gae7b350d7e7478a4c6047b08aa6544f40" id="r_gae7b350d7e7478a4c6047b08aa6544f40"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gae7b350d7e7478a4c6047b08aa6544f40">hwloc_topology_diff_apply</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> diff, unsigned long flags)</td></tr> |
| 81 |
<tr class="memitem:ga5dcff18f80583ac6505a94ba2877fd1b" id="r_ga5dcff18f80583ac6505a94ba2877fd1b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5dcff18f80583ac6505a94ba2877fd1b">hwloc_topology_diff_destroy</a> (<a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> diff)</td></tr> |
| 82 |
<tr class="memitem:ga2cd902ce8766e90d4f2523a8e87640e9" id="r_ga2cd902ce8766e90d4f2523a8e87640e9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2cd902ce8766e90d4f2523a8e87640e9">hwloc_topology_diff_load_xml</a> (const char *xmlpath, <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *diff, char **refname)</td></tr> |
| 83 |
<tr class="memitem:ga8a14dd7d01efbdd97af7fe85e8b84b20" id="r_ga8a14dd7d01efbdd97af7fe85e8b84b20"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8a14dd7d01efbdd97af7fe85e8b84b20">hwloc_topology_diff_export_xml</a> (<a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> diff, const char *refname, const char *xmlpath)</td></tr> |
| 84 |
<tr class="memitem:gad693810a5c51628529b9dd56f040fb81" id="r_gad693810a5c51628529b9dd56f040fb81"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gad693810a5c51628529b9dd56f040fb81">hwloc_topology_diff_load_xmlbuffer</a> (const char *xmlbuffer, int buflen, <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *diff, char **refname)</td></tr> |
| 85 |
<tr class="memitem:gaa2f0918df60c1c4a0bef9411f7d92a13" id="r_gaa2f0918df60c1c4a0bef9411f7d92a13"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa2f0918df60c1c4a0bef9411f7d92a13">hwloc_topology_diff_export_xmlbuffer</a> (<a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> diff, const char *refname, char **xmlbuffer, int *buflen)</td></tr> |
| 86 |
</table> |
| 87 |
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2> |
| 88 |
<p>Applications that manipulate many similar topologies, for instance one for each node of a homogeneous cluster, may want to compress topologies to reduce the memory footprint.</p> |
| 89 |
<p>This file offers a way to manipulate the difference between topologies and export/import it to/from XML. Compression may therefore be achieved by storing one topology entirely while the others are only described by their differences with the former. The actual topology can be reconstructed when actually needed by applying the precomputed difference to the reference topology.</p> |
| 90 |
<p>This interface targets very similar nodes. Only very simple differences between topologies are actually supported, for instance a change in the memory size, the name of the object, or some info attribute. More complex differences such as adding or removing objects cannot be represented in the difference structures and therefore return errors. Differences between object sets or topology-wide allowed sets, cannot be represented either.</p> |
| 91 |
<p>It means that there is no need to apply the difference when looking at the tree organization (how many levels, how many objects per level, what kind of objects, CPU and node sets, etc) and when binding to objects. However the difference must be applied when looking at object attributes such as the name, the memory size or info attributes. </p> |
| 92 |
<a name="doc-typedef-members" id="doc-typedef-members"></a><h2 id="header-doc-typedef-members" class="groupheader">Typedef Documentation</h2> |
| 93 |
<a id="ga74a3fefbaa17582fea86d76b312d6254" name="ga74a3fefbaa17582fea86d76b312d6254"></a> |
| 94 |
<h2 class="memtitle"><span class="permalink"><a href="#ga74a3fefbaa17582fea86d76b312d6254">◆ </a></span>hwloc_topology_diff_obj_attr_type_t</h2> |
| 95 |
|
| 96 |
<div class="memitem"> |
| 97 |
<div class="memproto"> |
| 98 |
<table class="memname"> |
| 99 |
<tr> |
| 100 |
<td class="memname">typedef enum <a class="el" href="#ga86f044210b0a9e9fa83acbdbbf7e05fd">hwloc_topology_diff_obj_attr_type_e</a> <a class="el" href="#ga74a3fefbaa17582fea86d76b312d6254">hwloc_topology_diff_obj_attr_type_t</a></td> |
| 101 |
</tr> |
| 102 |
</table> |
| 103 |
</div><div class="memdoc"> |
| 104 |
|
| 105 |
<p>Type of one object attribute difference. </p> |
| 106 |
|
| 107 |
</div> |
| 108 |
</div> |
| 109 |
<a id="ga1bd6363f26f7961f83153aaa484a9b85" name="ga1bd6363f26f7961f83153aaa484a9b85"></a> |
| 110 |
<h2 class="memtitle"><span class="permalink"><a href="#ga1bd6363f26f7961f83153aaa484a9b85">◆ </a></span>hwloc_topology_diff_t</h2> |
| 111 |
|
| 112 |
<div class="memitem"> |
| 113 |
<div class="memproto"> |
| 114 |
<table class="memname"> |
| 115 |
<tr> |
| 116 |
<td class="memname">typedef union <a class="el" href="a00340.html">hwloc_topology_diff_u</a> * <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td> |
| 117 |
</tr> |
| 118 |
</table> |
| 119 |
</div><div class="memdoc"> |
| 120 |
|
| 121 |
<p>One element of a difference list between two topologies. </p> |
| 122 |
|
| 123 |
</div> |
| 124 |
</div> |
| 125 |
<a id="ga8470f631b7365c839d3e40d38c5b6291" name="ga8470f631b7365c839d3e40d38c5b6291"></a> |
| 126 |
<h2 class="memtitle"><span class="permalink"><a href="#ga8470f631b7365c839d3e40d38c5b6291">◆ </a></span>hwloc_topology_diff_type_t</h2> |
| 127 |
|
| 128 |
<div class="memitem"> |
| 129 |
<div class="memproto"> |
| 130 |
<table class="memname"> |
| 131 |
<tr> |
| 132 |
<td class="memname">typedef enum <a class="el" href="#ga38b28b7423b85a3321e6d0062d5f83d0">hwloc_topology_diff_type_e</a> <a class="el" href="#ga8470f631b7365c839d3e40d38c5b6291">hwloc_topology_diff_type_t</a></td> |
| 133 |
</tr> |
| 134 |
</table> |
| 135 |
</div><div class="memdoc"> |
| 136 |
|
| 137 |
<p>Type of one element of a difference list. </p> |
| 138 |
|
| 139 |
</div> |
| 140 |
</div> |
| 141 |
<a name="doc-enum-members" id="doc-enum-members"></a><h2 id="header-doc-enum-members" class="groupheader">Enumeration Type Documentation</h2> |
| 142 |
<a id="gada4c1273ce020afaf02b649496f7edf5" name="gada4c1273ce020afaf02b649496f7edf5"></a> |
| 143 |
<h2 class="memtitle"><span class="permalink"><a href="#gada4c1273ce020afaf02b649496f7edf5">◆ </a></span>hwloc_topology_diff_apply_flags_e</h2> |
| 144 |
|
| 145 |
<div class="memitem"> |
| 146 |
<div class="memproto"> |
| 147 |
<table class="memname"> |
| 148 |
<tr> |
| 149 |
<td class="memname">enum <a class="el" href="#gada4c1273ce020afaf02b649496f7edf5">hwloc_topology_diff_apply_flags_e</a></td> |
| 150 |
</tr> |
| 151 |
</table> |
| 152 |
</div><div class="memdoc"> |
| 153 |
|
| 154 |
<p>Flags to be given to <a class="el" href="#gae7b350d7e7478a4c6047b08aa6544f40" title="Apply a topology diff to an existing topology.">hwloc_topology_diff_apply()</a>. </p> |
| 155 |
<table class="fieldtable"> |
| 156 |
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggada4c1273ce020afaf02b649496f7edf5a821a160512d67ea0dd05dab873d2fc54" name="ggada4c1273ce020afaf02b649496f7edf5a821a160512d67ea0dd05dab873d2fc54"></a>HWLOC_TOPOLOGY_DIFF_APPLY_REVERSE </td><td class="fielddoc"><p>Apply topology diff in reverse direction. </p> |
| 157 |
</td></tr> |
| 158 |
</table> |
| 159 |
|
| 160 |
</div> |
| 161 |
</div> |
| 162 |
<a id="ga86f044210b0a9e9fa83acbdbbf7e05fd" name="ga86f044210b0a9e9fa83acbdbbf7e05fd"></a> |
| 163 |
<h2 class="memtitle"><span class="permalink"><a href="#ga86f044210b0a9e9fa83acbdbbf7e05fd">◆ </a></span>hwloc_topology_diff_obj_attr_type_e</h2> |
| 164 |
|
| 165 |
<div class="memitem"> |
| 166 |
<div class="memproto"> |
| 167 |
<table class="memname"> |
| 168 |
<tr> |
| 169 |
<td class="memname">enum <a class="el" href="#ga86f044210b0a9e9fa83acbdbbf7e05fd">hwloc_topology_diff_obj_attr_type_e</a></td> |
| 170 |
</tr> |
| 171 |
</table> |
| 172 |
</div><div class="memdoc"> |
| 173 |
|
| 174 |
<p>Type of one object attribute difference. </p> |
| 175 |
<table class="fieldtable"> |
| 176 |
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga86f044210b0a9e9fa83acbdbbf7e05fdabc7f0c7ed0b6864e902f4b70f2c7bc94" name="gga86f044210b0a9e9fa83acbdbbf7e05fdabc7f0c7ed0b6864e902f4b70f2c7bc94"></a>HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE </td><td class="fielddoc"><p>The object local memory is modified. The union is a <a class="el" href="a00332.html" title="Integer attribute modification with an optional index.">hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_uint64_s</a> (and the index field is ignored). </p> |
| 177 |
</td></tr> |
| 178 |
<tr><td class="fieldname"><a id="gga86f044210b0a9e9fa83acbdbbf7e05fda94a8f37c51d62d15ac6192665dd49310" name="gga86f044210b0a9e9fa83acbdbbf7e05fda94a8f37c51d62d15ac6192665dd49310"></a>HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME </td><td class="fielddoc"><p>The object name is modified. The union is a <a class="el" href="a00336.html" title="String attribute modification with an optional name.">hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s</a> (and the name field is ignored). </p> |
| 179 |
</td></tr> |
| 180 |
<tr><td class="fieldname"><a id="gga86f044210b0a9e9fa83acbdbbf7e05fda63430bf932434bc456282f636d39c2c2" name="gga86f044210b0a9e9fa83acbdbbf7e05fda63430bf932434bc456282f636d39c2c2"></a>HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO </td><td class="fielddoc"><p>the value of an info attribute is modified. The union is a <a class="el" href="a00336.html" title="String attribute modification with an optional name.">hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s</a>. </p> |
| 181 |
</td></tr> |
| 182 |
</table> |
| 183 |
|
| 184 |
</div> |
| 185 |
</div> |
| 186 |
<a id="ga38b28b7423b85a3321e6d0062d5f83d0" name="ga38b28b7423b85a3321e6d0062d5f83d0"></a> |
| 187 |
<h2 class="memtitle"><span class="permalink"><a href="#ga38b28b7423b85a3321e6d0062d5f83d0">◆ </a></span>hwloc_topology_diff_type_e</h2> |
| 188 |
|
| 189 |
<div class="memitem"> |
| 190 |
<div class="memproto"> |
| 191 |
<table class="memname"> |
| 192 |
<tr> |
| 193 |
<td class="memname">enum <a class="el" href="#ga38b28b7423b85a3321e6d0062d5f83d0">hwloc_topology_diff_type_e</a></td> |
| 194 |
</tr> |
| 195 |
</table> |
| 196 |
</div><div class="memdoc"> |
| 197 |
|
| 198 |
<p>Type of one element of a difference list. </p> |
| 199 |
<table class="fieldtable"> |
| 200 |
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga38b28b7423b85a3321e6d0062d5f83d0accbcaee230f79989debb284c8626f0c0" name="gga38b28b7423b85a3321e6d0062d5f83d0accbcaee230f79989debb284c8626f0c0"></a>HWLOC_TOPOLOGY_DIFF_OBJ_ATTR </td><td class="fielddoc"><p>An object attribute was changed. The union is a <a class="el" href="a00348.html">hwloc_topology_diff_u::hwloc_topology_diff_obj_attr_s</a>. </p> |
| 201 |
</td></tr> |
| 202 |
<tr><td class="fieldname"><a id="gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147" name="gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147"></a>HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX </td><td class="fielddoc"><p>The difference is too complex, it cannot be represented. The difference below this object has not been checked. <a class="el" href="#ga8a1754f69fbb31364ea3ea2c39827c9f" title="Compute the difference between 2 topologies.">hwloc_topology_diff_build()</a> will return 1. </p> |
| 203 |
<p>The union is a <a class="el" href="a00352.html">hwloc_topology_diff_u::hwloc_topology_diff_too_complex_s</a>. </p> |
| 204 |
</td></tr> |
| 205 |
</table> |
| 206 |
|
| 207 |
</div> |
| 208 |
</div> |
| 209 |
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2> |
| 210 |
<a id="gae7b350d7e7478a4c6047b08aa6544f40" name="gae7b350d7e7478a4c6047b08aa6544f40"></a> |
| 211 |
<h2 class="memtitle"><span class="permalink"><a href="#gae7b350d7e7478a4c6047b08aa6544f40">◆ </a></span>hwloc_topology_diff_apply()</h2> |
| 212 |
|
| 213 |
<div class="memitem"> |
| 214 |
<div class="memproto"> |
| 215 |
<table class="memname"> |
| 216 |
<tr> |
| 217 |
<td class="memname">int hwloc_topology_diff_apply </td> |
| 218 |
<td>(</td> |
| 219 |
<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> |
| 220 |
</tr> |
| 221 |
<tr> |
| 222 |
<td class="paramkey"></td> |
| 223 |
<td></td> |
| 224 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td> <td class="paramname"><span class="paramname"><em>diff</em></span>, </td> |
| 225 |
</tr> |
| 226 |
<tr> |
| 227 |
<td class="paramkey"></td> |
| 228 |
<td></td> |
| 229 |
<td class="paramtype">unsigned long</td> <td class="paramname"><span class="paramname"><em>flags</em></span> )</td> |
| 230 |
</tr> |
| 231 |
</table> |
| 232 |
</div><div class="memdoc"> |
| 233 |
|
| 234 |
<p>Apply a topology diff to an existing topology. </p> |
| 235 |
<p><code class="param">flags</code> is an OR'ed set of <a class="el" href="#gada4c1273ce020afaf02b649496f7edf5" title="Flags to be given to hwloc_topology_diff_apply().">hwloc_topology_diff_apply_flags_e</a>.</p> |
| 236 |
<p>The new topology is modified in place. <a class="el" href="a00169.html#ga62a161fc5e6f120344dc69a7bee4e587" title="Duplicate a topology.">hwloc_topology_dup()</a> may be used to duplicate it before patching.</p> |
| 237 |
<p>If the difference cannot be applied entirely, all previous applied elements are unapplied before returning.</p> |
| 238 |
<dl class="section return"><dt>Returns</dt><dd>0 on success.</dd> |
| 239 |
<dd> |
| 240 |
-N if applying the difference failed while trying to apply the N-th part of the difference. For instance -1 is returned if the very first difference element could not be applied. </dd></dl> |
| 241 |
|
| 242 |
</div> |
| 243 |
</div> |
| 244 |
<a id="ga8a1754f69fbb31364ea3ea2c39827c9f" name="ga8a1754f69fbb31364ea3ea2c39827c9f"></a> |
| 245 |
<h2 class="memtitle"><span class="permalink"><a href="#ga8a1754f69fbb31364ea3ea2c39827c9f">◆ </a></span>hwloc_topology_diff_build()</h2> |
| 246 |
|
| 247 |
<div class="memitem"> |
| 248 |
<div class="memproto"> |
| 249 |
<table class="memname"> |
| 250 |
<tr> |
| 251 |
<td class="memname">int hwloc_topology_diff_build </td> |
| 252 |
<td>(</td> |
| 253 |
<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> |
| 254 |
</tr> |
| 255 |
<tr> |
| 256 |
<td class="paramkey"></td> |
| 257 |
<td></td> |
| 258 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>newtopology</em></span>, </td> |
| 259 |
</tr> |
| 260 |
<tr> |
| 261 |
<td class="paramkey"></td> |
| 262 |
<td></td> |
| 263 |
<td class="paramtype">unsigned long</td> <td class="paramname"><span class="paramname"><em>flags</em></span>, </td> |
| 264 |
</tr> |
| 265 |
<tr> |
| 266 |
<td class="paramkey"></td> |
| 267 |
<td></td> |
| 268 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *</td> <td class="paramname"><span class="paramname"><em>diff</em></span> )</td> |
| 269 |
</tr> |
| 270 |
</table> |
| 271 |
</div><div class="memdoc"> |
| 272 |
|
| 273 |
<p>Compute the difference between 2 topologies. </p> |
| 274 |
<p>The difference is stored as a list of <a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85" title="One element of a difference list between two topologies.">hwloc_topology_diff_t</a> entries starting at <code class="param">diff</code>. It is computed by doing a depth-first traversal of both topology trees simultaneously.</p> |
| 275 |
<p>If the difference between 2 objects is too complex to be represented (for instance if some objects have different types, or different numbers of children), a special diff entry of type <a class="el" href="#gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147" title="The difference is too complex, it cannot be represented. The difference below this object has not bee...">HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX</a> is queued. The computation of the diff does not continue below these objects. So each such diff entry means that the difference between two subtrees could not be computed.</p> |
| 276 |
<dl class="section return"><dt>Returns</dt><dd>0 if the difference can be represented properly.</dd> |
| 277 |
<dd> |
| 278 |
0 with <code class="param">diff</code> pointing to NULL if there is no difference between the topologies.</dd> |
| 279 |
<dd> |
| 280 |
1 if the difference is too complex (see above). Some entries in the list will be of type <a class="el" href="#gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147" title="The difference is too complex, it cannot be represented. The difference below this object has not bee...">HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX</a>.</dd> |
| 281 |
<dd> |
| 282 |
-1 on any other error.</dd></dl> |
| 283 |
<dl class="section note"><dt>Note</dt><dd><code class="param">flags</code> is currently not used. It should be 0.</dd> |
| 284 |
<dd> |
| 285 |
The output diff has to be freed with <a class="el" href="#ga5dcff18f80583ac6505a94ba2877fd1b" title="Destroy a list of topology differences.">hwloc_topology_diff_destroy()</a>.</dd> |
| 286 |
<dd> |
| 287 |
The output diff can only be exported to XML or passed to <a class="el" href="#gae7b350d7e7478a4c6047b08aa6544f40" title="Apply a topology diff to an existing topology.">hwloc_topology_diff_apply()</a> if 0 was returned, i.e. if no entry of type <a class="el" href="#gga38b28b7423b85a3321e6d0062d5f83d0a3dc01fdeff355efe3fb2516bb454a147" title="The difference is too complex, it cannot be represented. The difference below this object has not bee...">HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX</a> is listed.</dd> |
| 288 |
<dd> |
| 289 |
The output diff may be modified by removing some entries from the list. The removed entries should be freed by passing them to to <a class="el" href="#ga5dcff18f80583ac6505a94ba2877fd1b" title="Destroy a list of topology differences.">hwloc_topology_diff_destroy()</a> (possible as another list). </dd></dl> |
| 290 |
|
| 291 |
</div> |
| 292 |
</div> |
| 293 |
<a id="ga5dcff18f80583ac6505a94ba2877fd1b" name="ga5dcff18f80583ac6505a94ba2877fd1b"></a> |
| 294 |
<h2 class="memtitle"><span class="permalink"><a href="#ga5dcff18f80583ac6505a94ba2877fd1b">◆ </a></span>hwloc_topology_diff_destroy()</h2> |
| 295 |
|
| 296 |
<div class="memitem"> |
| 297 |
<div class="memproto"> |
| 298 |
<table class="memname"> |
| 299 |
<tr> |
| 300 |
<td class="memname">int hwloc_topology_diff_destroy </td> |
| 301 |
<td>(</td> |
| 302 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td> <td class="paramname"><span class="paramname"><em>diff</em></span></td><td>)</td> |
| 303 |
<td></td> |
| 304 |
</tr> |
| 305 |
</table> |
| 306 |
</div><div class="memdoc"> |
| 307 |
|
| 308 |
<p>Destroy a list of topology differences. </p> |
| 309 |
<dl class="section return"><dt>Returns</dt><dd>0. </dd></dl> |
| 310 |
|
| 311 |
</div> |
| 312 |
</div> |
| 313 |
<a id="ga8a14dd7d01efbdd97af7fe85e8b84b20" name="ga8a14dd7d01efbdd97af7fe85e8b84b20"></a> |
| 314 |
<h2 class="memtitle"><span class="permalink"><a href="#ga8a14dd7d01efbdd97af7fe85e8b84b20">◆ </a></span>hwloc_topology_diff_export_xml()</h2> |
| 315 |
|
| 316 |
<div class="memitem"> |
| 317 |
<div class="memproto"> |
| 318 |
<table class="memname"> |
| 319 |
<tr> |
| 320 |
<td class="memname">int hwloc_topology_diff_export_xml </td> |
| 321 |
<td>(</td> |
| 322 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td> <td class="paramname"><span class="paramname"><em>diff</em></span>, </td> |
| 323 |
</tr> |
| 324 |
<tr> |
| 325 |
<td class="paramkey"></td> |
| 326 |
<td></td> |
| 327 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>refname</em></span>, </td> |
| 328 |
</tr> |
| 329 |
<tr> |
| 330 |
<td class="paramkey"></td> |
| 331 |
<td></td> |
| 332 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>xmlpath</em></span> )</td> |
| 333 |
</tr> |
| 334 |
</table> |
| 335 |
</div><div class="memdoc"> |
| 336 |
|
| 337 |
<p>Export a list of topology differences to a XML file. </p> |
| 338 |
<p>If not <code>NULL</code>, <code class="param">refname</code> defines an identifier string for the reference topology which was used as a base when computing this difference. This identifier is usually the name of the other XML file that contains the reference topology. This attribute is given back when reading the diff from XML.</p> |
| 339 |
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on error. </dd></dl> |
| 340 |
|
| 341 |
</div> |
| 342 |
</div> |
| 343 |
<a id="gaa2f0918df60c1c4a0bef9411f7d92a13" name="gaa2f0918df60c1c4a0bef9411f7d92a13"></a> |
| 344 |
<h2 class="memtitle"><span class="permalink"><a href="#gaa2f0918df60c1c4a0bef9411f7d92a13">◆ </a></span>hwloc_topology_diff_export_xmlbuffer()</h2> |
| 345 |
|
| 346 |
<div class="memitem"> |
| 347 |
<div class="memproto"> |
| 348 |
<table class="memname"> |
| 349 |
<tr> |
| 350 |
<td class="memname">int hwloc_topology_diff_export_xmlbuffer </td> |
| 351 |
<td>(</td> |
| 352 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a></td> <td class="paramname"><span class="paramname"><em>diff</em></span>, </td> |
| 353 |
</tr> |
| 354 |
<tr> |
| 355 |
<td class="paramkey"></td> |
| 356 |
<td></td> |
| 357 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>refname</em></span>, </td> |
| 358 |
</tr> |
| 359 |
<tr> |
| 360 |
<td class="paramkey"></td> |
| 361 |
<td></td> |
| 362 |
<td class="paramtype">char **</td> <td class="paramname"><span class="paramname"><em>xmlbuffer</em></span>, </td> |
| 363 |
</tr> |
| 364 |
<tr> |
| 365 |
<td class="paramkey"></td> |
| 366 |
<td></td> |
| 367 |
<td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>buflen</em></span> )</td> |
| 368 |
</tr> |
| 369 |
</table> |
| 370 |
</div><div class="memdoc"> |
| 371 |
|
| 372 |
<p>Export a list of topology differences to a XML buffer. </p> |
| 373 |
<p>If not <code>NULL</code>, <code class="param">refname</code> defines an identifier string for the reference topology which was used as a base when computing this difference. This identifier is usually the name of the other XML file that contains the reference topology. This attribute is given back when reading the diff from XML.</p> |
| 374 |
<p>The returned buffer ends with a <code>\0</code> that is included in the returned length.</p> |
| 375 |
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on error.</dd></dl> |
| 376 |
<dl class="section note"><dt>Note</dt><dd>The XML buffer should later be freed with <a class="el" href="a00189.html#ga293e4a6489f15fd16ad22a5734561cf1" title="Free a buffer allocated by hwloc_topology_export_xmlbuffer().">hwloc_free_xmlbuffer()</a>. </dd></dl> |
| 377 |
|
| 378 |
</div> |
| 379 |
</div> |
| 380 |
<a id="ga2cd902ce8766e90d4f2523a8e87640e9" name="ga2cd902ce8766e90d4f2523a8e87640e9"></a> |
| 381 |
<h2 class="memtitle"><span class="permalink"><a href="#ga2cd902ce8766e90d4f2523a8e87640e9">◆ </a></span>hwloc_topology_diff_load_xml()</h2> |
| 382 |
|
| 383 |
<div class="memitem"> |
| 384 |
<div class="memproto"> |
| 385 |
<table class="memname"> |
| 386 |
<tr> |
| 387 |
<td class="memname">int hwloc_topology_diff_load_xml </td> |
| 388 |
<td>(</td> |
| 389 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>xmlpath</em></span>, </td> |
| 390 |
</tr> |
| 391 |
<tr> |
| 392 |
<td class="paramkey"></td> |
| 393 |
<td></td> |
| 394 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *</td> <td class="paramname"><span class="paramname"><em>diff</em></span>, </td> |
| 395 |
</tr> |
| 396 |
<tr> |
| 397 |
<td class="paramkey"></td> |
| 398 |
<td></td> |
| 399 |
<td class="paramtype">char **</td> <td class="paramname"><span class="paramname"><em>refname</em></span> )</td> |
| 400 |
</tr> |
| 401 |
</table> |
| 402 |
</div><div class="memdoc"> |
| 403 |
|
| 404 |
<p>Load a list of topology differences from a XML file. </p> |
| 405 |
<p>If not <code>NULL</code>, <code class="param">refname</code> will be filled with the identifier string of the reference topology for the difference file, if any was specified in the XML file. This identifier is usually the name of the other XML file that contains the reference topology.</p> |
| 406 |
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on error.</dd></dl> |
| 407 |
<dl class="section note"><dt>Note</dt><dd>the pointer returned in refname should later be freed by the caller. </dd></dl> |
| 408 |
|
| 409 |
</div> |
| 410 |
</div> |
| 411 |
<a id="gad693810a5c51628529b9dd56f040fb81" name="gad693810a5c51628529b9dd56f040fb81"></a> |
| 412 |
<h2 class="memtitle"><span class="permalink"><a href="#gad693810a5c51628529b9dd56f040fb81">◆ </a></span>hwloc_topology_diff_load_xmlbuffer()</h2> |
| 413 |
|
| 414 |
<div class="memitem"> |
| 415 |
<div class="memproto"> |
| 416 |
<table class="memname"> |
| 417 |
<tr> |
| 418 |
<td class="memname">int hwloc_topology_diff_load_xmlbuffer </td> |
| 419 |
<td>(</td> |
| 420 |
<td class="paramtype">const char *</td> <td class="paramname"><span class="paramname"><em>xmlbuffer</em></span>, </td> |
| 421 |
</tr> |
| 422 |
<tr> |
| 423 |
<td class="paramkey"></td> |
| 424 |
<td></td> |
| 425 |
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>buflen</em></span>, </td> |
| 426 |
</tr> |
| 427 |
<tr> |
| 428 |
<td class="paramkey"></td> |
| 429 |
<td></td> |
| 430 |
<td class="paramtype"><a class="el" href="#ga1bd6363f26f7961f83153aaa484a9b85">hwloc_topology_diff_t</a> *</td> <td class="paramname"><span class="paramname"><em>diff</em></span>, </td> |
| 431 |
</tr> |
| 432 |
<tr> |
| 433 |
<td class="paramkey"></td> |
| 434 |
<td></td> |
| 435 |
<td class="paramtype">char **</td> <td class="paramname"><span class="paramname"><em>refname</em></span> )</td> |
| 436 |
</tr> |
| 437 |
</table> |
| 438 |
</div><div class="memdoc"> |
| 439 |
|
| 440 |
<p>Load a list of topology differences from a XML buffer. </p> |
| 441 |
<p>Build a list of differences from the XML memory buffer given at <code class="param">xmlbuffer</code> and of length <code class="param">buflen</code> (including an ending <code>\0</code>). This buffer may have been filled earlier with <a class="el" href="#gaa2f0918df60c1c4a0bef9411f7d92a13" title="Export a list of topology differences to a XML buffer.">hwloc_topology_diff_export_xmlbuffer()</a>.</p> |
| 442 |
<p>If not <code>NULL</code>, <code class="param">refname</code> will be filled with the identifier string of the reference topology for the difference file, if any was specified in the XML file. This identifier is usually the name of the other XML file that contains the reference topology.</p> |
| 443 |
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on error.</dd></dl> |
| 444 |
<dl class="section note"><dt>Note</dt><dd>the pointer returned in refname should later be freed by the caller. </dd></dl> |
| 445 |
|
| 446 |
</div> |
| 447 |
</div> |
| 448 |
</div><!-- contents --> |
| 449 |
<!-- start footer part --> |
| 450 |
<hr class="footer"/><address class="footer"><small> |
| 451 |
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 |
| 452 |
</small></address> |
| 453 |
</div><!-- doc-content --> |
| 454 |
</body> |
| 455 |
</html> |