File: hwlocality_levels.3

package info (click to toggle)
hwloc 2.12.0-4~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 23,576 kB
  • sloc: ansic: 60,875; xml: 13,559; sh: 7,332; makefile: 2,154; javascript: 879; cpp: 93; php: 8; sed: 5
file content (280 lines) | stat: -rw-r--r-- 10,578 bytes parent folder | download | duplicates (4)
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
.TH "hwlocality_levels" 3 "Version 2.12.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_levels \- Object levels, depths and types
.SH SYNOPSIS
.br
.PP
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBhwloc_get_type_depth_e\fP { \fBHWLOC_TYPE_DEPTH_UNKNOWN\fP, \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP, \fBHWLOC_TYPE_DEPTH_NUMANODE\fP, \fBHWLOC_TYPE_DEPTH_BRIDGE\fP, \fBHWLOC_TYPE_DEPTH_PCI_DEVICE\fP, \fBHWLOC_TYPE_DEPTH_OS_DEVICE\fP, \fBHWLOC_TYPE_DEPTH_MISC\fP, \fBHWLOC_TYPE_DEPTH_MEMCACHE\fP }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBhwloc_topology_get_depth\fP (\fBhwloc_topology_t\fP restrict topology)"
.br
.ti -1c
.RI "int \fBhwloc_get_type_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "int \fBhwloc_get_memory_parents_depth\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "int \fBhwloc_get_type_or_below_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "int \fBhwloc_get_type_or_above_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "\fBhwloc_obj_type_t\fP \fBhwloc_get_depth_type\fP (\fBhwloc_topology_t\fP topology, int depth)"
.br
.ti -1c
.RI "unsigned \fBhwloc_get_nbobjs_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth)"
.br
.ti -1c
.RI "int \fBhwloc_get_nbobjs_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_root_obj\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth, unsigned idx)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, unsigned idx)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP prev)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Be sure to see the figure in \fBTerms and Definitions\fP 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\&. 
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBhwloc_get_type_depth_e\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIHWLOC_TYPE_DEPTH_UNKNOWN \fP\fP
No object of given type exists in the topology\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_MULTIPLE \fP\fP
Objects of given type exist at different depth in the topology (only for Groups)\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_NUMANODE \fP\fP
Virtual depth for NUMA nodes\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_BRIDGE \fP\fP
Virtual depth for bridge object level\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_PCI_DEVICE \fP\fP
Virtual depth for PCI device object level\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_OS_DEVICE \fP\fP
Virtual depth for software device object level\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_MISC \fP\fP
Virtual depth for Misc object\&. 
.TP
\fB\fIHWLOC_TYPE_DEPTH_MEMCACHE \fP\fP
Virtual depth for MemCache object\&. 
.SH "Function Documentation"
.PP 
.SS "\fBhwloc_obj_type_t\fP hwloc_get_depth_type (\fBhwloc_topology_t\fP topology, int depth)"

.PP
Returns the type of objects at depth \fCdepth\fP\&. \fCdepth\fP should between 0 and \fBhwloc_topology_get_depth()\fP-1, or a virtual depth such as \fBHWLOC_TYPE_DEPTH_NUMANODE\fP\&.
.PP
\fBReturns\fP
.RS 4
The type of objects at depth \fCdepth\fP\&. 
.PP
(hwloc_obj_type_t)-1 if depth \fCdepth\fP does not exist\&. 
.RE
.PP

.SS "int hwloc_get_memory_parents_depth (\fBhwloc_topology_t\fP topology)"

.PP
Return the depth of parents where memory objects are attached\&. Memory objects have virtual negative depths because they are not part of the main CPU-side hierarchy of objects\&. This depth should not be compared with other level depths\&.
.PP
If all Memory objects are attached to Normal parents at the same depth, this parent depth may be compared to other as usual, for instance for knowing whether NUMA nodes is attached above or below Packages\&.
.PP
\fBReturns\fP
.RS 4
The depth of Normal parents of all memory children if all these parents have the same depth\&. For instance the depth of the Package level if all NUMA nodes are attached to Package objects\&.
.PP
\fBHWLOC_TYPE_DEPTH_MULTIPLE\fP if Normal parents of all memory children do not have the same depth\&. For instance if some NUMA nodes are attached to Packages while others are attached to Groups\&. 
.RE
.PP

.SS "unsigned hwloc_get_nbobjs_by_depth (\fBhwloc_topology_t\fP topology, int depth)"

.PP
Returns the width of level at depth \fCdepth\fP\&. 
.PP
\fBReturns\fP
.RS 4
The number of objects at topology depth \fCdepth\fP\&. 
.PP
0 if there are no objects at depth \fCdepth\fP\&. 
.RE
.PP

.SS "int hwloc_get_nbobjs_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [inline]\fP"

.PP
Returns the width of level type \fCtype\fP\&. 
.PP
\fBReturns\fP
.RS 4
The number of objects of type \fCtype\fP\&. 
.PP
-1 if there are multiple levels with objects of that type, e\&.g\&. \fBHWLOC_OBJ_GROUP\fP\&. 
.PP
0 if there are no objects at depth \fCdepth\fP\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_next_obj_by_depth (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP prev)\fC [inline]\fP"

.PP
Returns the next object at depth \fCdepth\fP\&. 
.PP
\fBReturns\fP
.RS 4
The first object at depth \fCdepth\fP if \fCprev\fP is \fCNULL\fP\&. 
.PP
The object after \fCprev\fP at depth \fCdepth\fP if \fCprev\fP is not \fCNULL\fP\&. 
.PP
\fCNULL\fP if there is no such object\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_next_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [inline]\fP"

.PP
Returns the next object of type \fCtype\fP\&. 
.PP
\fBReturns\fP
.RS 4
The first object of type \fCtype\fP if \fCprev\fP is \fCNULL\fP\&. 
.PP
The object after \fCprev\fP of type \fCtype\fP if \fCprev\fP is not \fCNULL\fP\&. 
.PP
\fCNULL\fP if there is no such object\&. 
.PP
\fCNULL\fP if there are multiple levels with objects of that type (e\&.g\&. \fBHWLOC_OBJ_GROUP\fP), the caller may fallback to \fBhwloc_get_obj_by_depth()\fP\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_obj_by_depth (\fBhwloc_topology_t\fP topology, int depth, unsigned idx)"

.PP
Returns the topology object at logical index \fCidx\fP from depth \fCdepth\fP\&. 
.PP
\fBReturns\fP
.RS 4
The object if it exists\&. 
.PP
\fCNULL\fP if there is no object with this index and depth\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, unsigned idx)\fC [inline]\fP"

.PP
Returns the topology object at logical index \fCidx\fP with type \fCtype\fP\&. 
.PP
\fBReturns\fP
.RS 4
The object if it exists\&. 
.PP
\fCNULL\fP if there is no object with this index and type\&. 
.PP
\fCNULL\fP if there are multiple levels with objects of that type (e\&.g\&. \fBHWLOC_OBJ_GROUP\fP), the caller may fallback to \fBhwloc_get_obj_by_depth()\fP\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_root_obj (\fBhwloc_topology_t\fP topology)\fC [inline]\fP"

.PP
Returns the top-object of the topology-tree\&. Its type is \fBHWLOC_OBJ_MACHINE\fP\&.
.PP
This function cannot return \fCNULL\fP\&. 
.SS "int hwloc_get_type_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"

.PP
Returns the depth of objects of type \fCtype\fP\&. 
.PP
\fBReturns\fP
.RS 4
The depth of objects of type \fCtype\fP\&.
.PP
A negative virtual depth if a NUMA node, I/O or Misc object type is given\&. These objects are stored in special levels that are not CPU-related\&. This virtual depth may be passed to other hwloc functions such as \fBhwloc_get_obj_by_depth()\fP but it should not be considered as an actual depth by the application\&. In particular, it should not be compared with any other object depth or with the entire topology depth\&.
.PP
\fBHWLOC_TYPE_DEPTH_UNKNOWN\fP if no object of this type is present on the underlying architecture, or if the OS doesn't provide this kind of information\&.
.PP
\fBHWLOC_TYPE_DEPTH_MULTIPLE\fP if type \fBHWLOC_OBJ_GROUP\fP is given and multiple levels of Groups exist\&.
.RE
.PP
\fBNote\fP
.RS 4
If the type is absent but a similar type is acceptable, see also \fBhwloc_get_type_or_below_depth()\fP and \fBhwloc_get_type_or_above_depth()\fP\&.
.RE
.PP
\fBSee also\fP
.RS 4
\fBhwloc_get_memory_parents_depth()\fP for managing the depth of memory objects\&.
.PP
\fBhwloc_type_sscanf_as_depth()\fP for returning the depth of objects whose type is given as a string\&. 
.RE
.PP

.SS "int hwloc_get_type_or_above_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [inline]\fP"

.PP
Returns the depth of objects of type \fCtype\fP or above\&. If no object of this type is present on the underlying architecture, the function returns the depth of the first 'present' object typically containing \fCtype\fP\&.
.PP
This function is only meaningful for normal object types\&. If a memory, I/O or Misc object type is given, the corresponding virtual depth is always returned (see \fBhwloc_get_type_depth()\fP)\&.
.PP
May return \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP for \fBHWLOC_OBJ_GROUP\fP just like \fBhwloc_get_type_depth()\fP\&. 
.SS "int hwloc_get_type_or_below_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [inline]\fP"

.PP
Returns the depth of objects of type \fCtype\fP or below\&. If no object of this type is present on the underlying architecture, the function returns the depth of the first 'present' object typically found inside \fCtype\fP\&.
.PP
This function is only meaningful for normal object types\&. If a memory, I/O or Misc object type is given, the corresponding virtual depth is always returned (see \fBhwloc_get_type_depth()\fP)\&.
.PP
May return \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP for \fBHWLOC_OBJ_GROUP\fP just like \fBhwloc_get_type_depth()\fP\&. 
.SS "int hwloc_topology_get_depth (\fBhwloc_topology_t\fP restrict topology)"

.PP
Get the depth of the hierarchical tree of objects\&. This is the depth of \fBHWLOC_OBJ_PU\fP objects plus one\&.
.PP
\fBReturns\fP
.RS 4
the depth of the object tree\&.
.RE
.PP
\fBNote\fP
.RS 4
NUMA nodes, I/O and Misc objects are ignored when computing the depth of the tree (they are placed on special levels)\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.