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
|
<!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): Interoperability with Linux libnuma bitmask</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">Interoperability with Linux libnuma bitmask</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:gad8769b4544c0aeef154fc8223144e343"><td class="memItemLeft" align="right" valign="top">static struct bitmask * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html#gad8769b4544c0aeef154fc8223144e343">hwloc_cpuset_to_linux_libnuma_bitmask</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00189.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> cpuset)</td></tr>
<tr class="separator:gad8769b4544c0aeef154fc8223144e343"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadfaa14c1bec76965ac2e05f0c3f3473b"><td class="memItemLeft" align="right" valign="top">static struct bitmask * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html#gadfaa14c1bec76965ac2e05f0c3f3473b">hwloc_nodeset_to_linux_libnuma_bitmask</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00189.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset)</td></tr>
<tr class="separator:gadfaa14c1bec76965ac2e05f0c3f3473b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga37c8421110b1842414809019098794ef"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html#ga37c8421110b1842414809019098794ef">hwloc_cpuset_from_linux_libnuma_bitmask</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00189.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> cpuset, const struct bitmask *bitmask)</td></tr>
<tr class="separator:ga37c8421110b1842414809019098794ef"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaca6bff3086aad5bdbd2f4c5f0ad14cc"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00222.html#gaaca6bff3086aad5bdbd2f4c5f0ad14cc">hwloc_nodeset_from_linux_libnuma_bitmask</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00189.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a> nodeset, const struct bitmask *bitmask)</td></tr>
<tr class="separator:gaaca6bff3086aad5bdbd2f4c5f0ad14cc"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This interface helps converting between Linux libnuma bitmasks and hwloc cpusets and nodesets.</p>
<dl class="section note"><dt>Note</dt><dd>Topology <code>topology</code> must match the current machine.</dd>
<dd>
The behavior of libnuma is undefined if the kernel is not NUMA-aware. (when CONFIG_NUMA is not set in the kernel configuration). This helper and libnuma may thus not be strictly compatible in this case, which may be detected by checking whether numa_available() returns -1. </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga37c8421110b1842414809019098794ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37c8421110b1842414809019098794ef">◆ </a></span>hwloc_cpuset_from_linux_libnuma_bitmask()</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_cpuset_from_linux_libnuma_bitmask </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="a00189.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> </td>
<td class="paramname"><em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct bitmask * </td>
<td class="paramname"><em>bitmask</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>Convert libnuma bitmask <code>bitmask</code> into hwloc CPU set <code>cpuset</code>. </p>
<p>This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. </p>
</div>
</div>
<a id="gad8769b4544c0aeef154fc8223144e343"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8769b4544c0aeef154fc8223144e343">◆ </a></span>hwloc_cpuset_to_linux_libnuma_bitmask()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static struct bitmask * hwloc_cpuset_to_linux_libnuma_bitmask </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="a00189.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> </td>
<td class="paramname"><em>cpuset</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>Convert hwloc CPU set <code>cpuset</code> into the returned libnuma bitmask. </p>
<p>The returned bitmask should later be freed with numa_bitmask_free.</p>
<p>This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.</p>
<dl class="section return"><dt>Returns</dt><dd>newly allocated struct bitmask. </dd></dl>
</div>
</div>
<a id="gaaca6bff3086aad5bdbd2f4c5f0ad14cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaca6bff3086aad5bdbd2f4c5f0ad14cc">◆ </a></span>hwloc_nodeset_from_linux_libnuma_bitmask()</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_nodeset_from_linux_libnuma_bitmask </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="a00189.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a> </td>
<td class="paramname"><em>nodeset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct bitmask * </td>
<td class="paramname"><em>bitmask</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>Convert libnuma bitmask <code>bitmask</code> into hwloc NUMA node set <code>nodeset</code>. </p>
<p>This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. </p>
</div>
</div>
<a id="gadfaa14c1bec76965ac2e05f0c3f3473b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadfaa14c1bec76965ac2e05f0c3f3473b">◆ </a></span>hwloc_nodeset_to_linux_libnuma_bitmask()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static struct bitmask * hwloc_nodeset_to_linux_libnuma_bitmask </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="a00189.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> </td>
<td class="paramname"><em>nodeset</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>Convert hwloc NUMA node set <code>nodeset</code> into the returned libnuma bitmask. </p>
<p>The returned bitmask should later be freed with numa_bitmask_free.</p>
<p>This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.</p>
<dl class="section return"><dt>Returns</dt><dd>newly allocated struct bitmask. </dd></dl>
</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>
|