File: a00218.html

package info (click to toggle)
hwloc-contrib 2.4.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 21,976 kB
  • sloc: ansic: 58,129; xml: 12,064; sh: 6,822; makefile: 2,200; javascript: 1,623; perl: 380; cpp: 93; php: 8; sed: 4
file content (414 lines) | stat: -rw-r--r-- 26,539 bytes parent folder | download | duplicates (2)
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!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): Managing memory attributes</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)
   &#160;<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&amp;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="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Managing memory attributes</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga78aceb4cac4d614c0f5e82dbfeb779e5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga78aceb4cac4d614c0f5e82dbfeb779e5">hwloc_memattr_flag_e</a> { <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5af29e65444a6ed00f5cc246df06f65815">HWLOC_MEMATTR_FLAG_HIGHER_FIRST</a> = (1UL&lt;&lt;0)
, <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9601b5b0e1e68635e7e9901f28bd93bf">HWLOC_MEMATTR_FLAG_LOWER_FIRST</a> = (1UL&lt;&lt;1)
, <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9d16523e285b2e22cfc78cc84dce8c96">HWLOC_MEMATTR_FLAG_NEED_INITIATOR</a> = (1UL&lt;&lt;2)
 }</td></tr>
<tr class="separator:ga78aceb4cac4d614c0f5e82dbfeb779e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5300e9be1abdea2e00c18492148aecd0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga5300e9be1abdea2e00c18492148aecd0">hwloc_memattr_get_name</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> attribute, const char **name)</td></tr>
<tr class="separator:ga5300e9be1abdea2e00c18492148aecd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c62b626085adeaffb233e5f2a03a5eb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga4c62b626085adeaffb233e5f2a03a5eb">hwloc_memattr_get_flags</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> attribute, unsigned long *flags)</td></tr>
<tr class="separator:ga4c62b626085adeaffb233e5f2a03a5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga770657d1e44b09e93e09f623936c1e5f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga770657d1e44b09e93e09f623936c1e5f">hwloc_memattr_register</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const char *name, unsigned long flags, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> *id)</td></tr>
<tr class="separator:ga770657d1e44b09e93e09f623936c1e5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga960529c08b25cf15825e0f72ecceb504"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga960529c08b25cf15825e0f72ecceb504">hwloc_memattr_set_value</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> attribute, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> target_node, struct <a class="el" href="a00320.html">hwloc_location</a> *initiator, unsigned long flags, hwloc_uint64_t value)</td></tr>
<tr class="separator:ga960529c08b25cf15825e0f72ecceb504"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3177cc0ab47e4dd1fa69ca1df4c7cb1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga3177cc0ab47e4dd1fa69ca1df4c7cb1a">hwloc_memattr_get_targets</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> attribute, struct <a class="el" href="a00320.html">hwloc_location</a> *initiator, unsigned long flags, unsigned *nrp, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> *targets, hwloc_uint64_t *values)</td></tr>
<tr class="separator:ga3177cc0ab47e4dd1fa69ca1df4c7cb1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga049aaa860dcbbf0792f0fd4251a99ec0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00218.html#ga049aaa860dcbbf0792f0fd4251a99ec0">hwloc_memattr_get_initiators</a> (<a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> attribute, <a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> target_node, unsigned long flags, unsigned *nr, struct <a class="el" href="a00320.html">hwloc_location</a> *initiators, hwloc_uint64_t *values)</td></tr>
<tr class="separator:ga049aaa860dcbbf0792f0fd4251a99ec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga78aceb4cac4d614c0f5e82dbfeb779e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga78aceb4cac4d614c0f5e82dbfeb779e5">&#9670;&nbsp;</a></span>hwloc_memattr_flag_e</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="a00218.html#ga78aceb4cac4d614c0f5e82dbfeb779e5">hwloc_memattr_flag_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Memory attribute flags. Given to <a class="el" href="a00218.html#ga770657d1e44b09e93e09f623936c1e5f" title="Register a new memory attribute.">hwloc_memattr_register()</a> and returned by <a class="el" href="a00218.html#ga4c62b626085adeaffb233e5f2a03a5eb" title="Return the flags of the given attribute.">hwloc_memattr_get_flags()</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga78aceb4cac4d614c0f5e82dbfeb779e5af29e65444a6ed00f5cc246df06f65815"></a>HWLOC_MEMATTR_FLAG_HIGHER_FIRST&#160;</td><td class="fielddoc"><p>The best nodes for this memory attribute are those with the higher values. For instance Bandwidth. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga78aceb4cac4d614c0f5e82dbfeb779e5a9601b5b0e1e68635e7e9901f28bd93bf"></a>HWLOC_MEMATTR_FLAG_LOWER_FIRST&#160;</td><td class="fielddoc"><p>The best nodes for this memory attribute are those with the lower values. For instance Latency. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga78aceb4cac4d614c0f5e82dbfeb779e5a9d16523e285b2e22cfc78cc84dce8c96"></a>HWLOC_MEMATTR_FLAG_NEED_INITIATOR&#160;</td><td class="fielddoc"><p>The value returned for this memory attribute depends on the given initiator. For instance Bandwidth and Latency, but not Capacity. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga4c62b626085adeaffb233e5f2a03a5eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c62b626085adeaffb233e5f2a03a5eb">&#9670;&nbsp;</a></span>hwloc_memattr_get_flags()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_get_flags </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long *&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the flags of the given attribute. </p>
<p>Flags are a OR'ed set of <a class="el" href="a00218.html#ga78aceb4cac4d614c0f5e82dbfeb779e5" title="Memory attribute flags. Given to hwloc_memattr_register() and returned by hwloc_memattr_get_flags().">hwloc_memattr_flag_e</a>. </p>

</div>
</div>
<a id="ga049aaa860dcbbf0792f0fd4251a99ec0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga049aaa860dcbbf0792f0fd4251a99ec0">&#9670;&nbsp;</a></span>hwloc_memattr_get_initiators()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_get_initiators </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td>
          <td class="paramname"><em>target_node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned *&#160;</td>
          <td class="paramname"><em>nr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="a00320.html">hwloc_location</a> *&#160;</td>
          <td class="paramname"><em>initiators</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_uint64_t *&#160;</td>
          <td class="paramname"><em>values</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the initiators that have values for a given attribute for a specific target NUMA node. </p>
<p>Return initiators for the given attribute and target node in the <code>initiators</code> array. If <code>values</code> is not <code>NULL</code>, the corresponding attribute values are stored in the array it points to.</p>
<p>On input, <code>nr</code> points to the number of initiators that may be stored in the array <code>initiators</code> (and <code>values</code>). On output, <code>nr</code> points to the number of initiators (and values) that were actually found, even if some of them couldn't be stored in the array. Initiators that couldn't be stored are ignored, but the function still returns success (<code>0</code>). The caller may find out by comparing the value pointed by <code>nr</code> before and after the function call.</p>
<p>The returned initiators should not be modified or freed, they belong to the topology.</p>
<p><code>flags</code> must be <code>0</code> for now.</p>
<p>If the attribute does not relate to a specific initiator (it does not have the flag <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9d16523e285b2e22cfc78cc84dce8c96" title="The value returned for this memory attribute depends on the given initiator. For instance Bandwidth a...">HWLOC_MEMATTR_FLAG_NEED_INITIATOR</a>), no initiator is returned.</p>
<dl class="section note"><dt>Note</dt><dd>This function is meant for tools and debugging (listing internal information) rather than for application queries. Applications should rather select useful NUMA nodes with <a class="el" href="a00217.html#ga569e80c5be7ef27649b0ef5aa52ffcdc" title="Return an array of local NUMA nodes.">hwloc_get_local_numanode_objs()</a> and then look at their attribute values for some relevant initiators. </dd></dl>

</div>
</div>
<a id="ga5300e9be1abdea2e00c18492148aecd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5300e9be1abdea2e00c18492148aecd0">&#9670;&nbsp;</a></span>hwloc_memattr_get_name()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_get_name </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the name of a memory attribute. </p>

</div>
</div>
<a id="ga3177cc0ab47e4dd1fa69ca1df4c7cb1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3177cc0ab47e4dd1fa69ca1df4c7cb1a">&#9670;&nbsp;</a></span>hwloc_memattr_get_targets()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_get_targets </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="a00320.html">hwloc_location</a> *&#160;</td>
          <td class="paramname"><em>initiator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned *&#160;</td>
          <td class="paramname"><em>nrp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> *&#160;</td>
          <td class="paramname"><em>targets</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_uint64_t *&#160;</td>
          <td class="paramname"><em>values</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the target NUMA nodes that have some values for a given attribute. </p>
<p>Return targets for the given attribute in the <code>targets</code> array (for the given initiator if any). If <code>values</code> is not <code>NULL</code>, the corresponding attribute values are stored in the array it points to.</p>
<p>On input, <code>nr</code> points to the number of targets that may be stored in the array <code>targets</code> (and <code>values</code>). On output, <code>nr</code> points to the number of targets (and values) that were actually found, even if some of them couldn't be stored in the array. Targets that couldn't be stored are ignored, but the function still returns success (<code>0</code>). The caller may find out by comparing the value pointed by <code>nr</code> before and after the function call.</p>
<p>The returned targets should not be modified or freed, they belong to the topology.</p>
<p>Argument <code>initiator</code> is ignored if the attribute does not relate to a specific initiator (it does not have the flag <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9d16523e285b2e22cfc78cc84dce8c96" title="The value returned for this memory attribute depends on the given initiator. For instance Bandwidth a...">HWLOC_MEMATTR_FLAG_NEED_INITIATOR</a>). Otherwise <code>initiator</code> may be non <code>NULL</code> to report only targets that have a value for that initiator.</p>
<p><code>flags</code> must be <code>0</code> for now.</p>
<dl class="section note"><dt>Note</dt><dd>This function is meant for tools and debugging (listing internal information) rather than for application queries. Applications should rather select useful NUMA nodes with <a class="el" href="a00217.html#ga569e80c5be7ef27649b0ef5aa52ffcdc" title="Return an array of local NUMA nodes.">hwloc_get_local_numanode_objs()</a> and then look at their attribute values.</dd>
<dd>
The initiator <code>initiator</code> should be of type <a class="el" href="a00217.html#gga33099ba58f607fc70925da3777688586a7135318a86361ad75fd1648e6bf6d174" title="Location is given as a cpuset, in the location cpuset union field.">HWLOC_LOCATION_TYPE_CPUSET</a> when refering to accesses performed by CPU cores. <a class="el" href="a00217.html#gga33099ba58f607fc70925da3777688586af637c39b23d48cff15ddb008644aaa84" title="Location is given as an object, in the location object union field.">HWLOC_LOCATION_TYPE_OBJECT</a> is currently unused internally by hwloc, but users may for instance use it to provide custom information about host memory accesses performed by GPUs. </dd></dl>

</div>
</div>
<a id="ga770657d1e44b09e93e09f623936c1e5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga770657d1e44b09e93e09f623936c1e5f">&#9670;&nbsp;</a></span>hwloc_memattr_register()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_register </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a> *&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register a new memory attribute. </p>
<p>Add a specific memory attribute that is not defined in <a class="el" href="a00217.html#gab4bde745db676fc2ea4b47011cd9a80e" title="Memory node attributes.">hwloc_memattr_id_e</a>. Flags are a OR'ed set of <a class="el" href="a00218.html#ga78aceb4cac4d614c0f5e82dbfeb779e5" title="Memory attribute flags. Given to hwloc_memattr_register() and returned by hwloc_memattr_get_flags().">hwloc_memattr_flag_e</a>. It must contain at least one of <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5af29e65444a6ed00f5cc246df06f65815" title="The best nodes for this memory attribute are those with the higher values. For instance Bandwidth.">HWLOC_MEMATTR_FLAG_HIGHER_FIRST</a> or <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9601b5b0e1e68635e7e9901f28bd93bf" title="The best nodes for this memory attribute are those with the lower values. For instance Latency.">HWLOC_MEMATTR_FLAG_LOWER_FIRST</a>. </p>

</div>
</div>
<a id="ga960529c08b25cf15825e0f72ecceb504"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga960529c08b25cf15825e0f72ecceb504">&#9670;&nbsp;</a></span>hwloc_memattr_set_value()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_memattr_set_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00217.html#gacc82003a8610be554615995f0996c888">hwloc_memattr_id_t</a>&#160;</td>
          <td class="paramname"><em>attribute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00191.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td>
          <td class="paramname"><em>target_node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="a00320.html">hwloc_location</a> *&#160;</td>
          <td class="paramname"><em>initiator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_uint64_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set an attribute value for a specific target NUMA node. </p>
<p>If the attribute does not relate to a specific initiator (it does not have the flag <a class="el" href="a00218.html#gga78aceb4cac4d614c0f5e82dbfeb779e5a9d16523e285b2e22cfc78cc84dce8c96" title="The value returned for this memory attribute depends on the given initiator. For instance Bandwidth a...">HWLOC_MEMATTR_FLAG_NEED_INITIATOR</a>), location <code>initiator</code> is ignored and may be <code>NULL</code>.</p>
<p>The initiator will be copied into the topology, the caller should free anything allocated to store the initiator, for instance the cpuset.</p>
<p><code>flags</code> must be <code>0</code> for now.</p>
<dl class="section note"><dt>Note</dt><dd>The initiator <code>initiator</code> should be of type <a class="el" href="a00217.html#gga33099ba58f607fc70925da3777688586a7135318a86361ad75fd1648e6bf6d174" title="Location is given as a cpuset, in the location cpuset union field.">HWLOC_LOCATION_TYPE_CPUSET</a> when refering to accesses performed by CPU cores. <a class="el" href="a00217.html#gga33099ba58f607fc70925da3777688586af637c39b23d48cff15ddb008644aaa84" title="Location is given as an object, in the location object union field.">HWLOC_LOCATION_TYPE_OBJECT</a> is currently unused internally by hwloc, but users may for instance use it to provide custom information about host memory accesses performed by GPUs. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
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.9.1
</small></address>
</body>
</html>