Debian Codegraph @

doc/doxygen-doc/man/man3/hwlocality_levels.3

raw
1 .TH "hwlocality_levels" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hwlocality_levels \- Object levels, depths and types
6 .SH SYNOPSIS
7 .br
8 .PP
9 .SS "Enumerations"
10
11 .in +1c
12 .ti -1c
13 .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 }"
14 .br
15 .in -1c
16 .SS "Functions"
17
18 .in +1c
19 .ti -1c
20 .RI "int \fBhwloc_topology_get_depth\fP (\fBhwloc_topology_t\fP restrict topology)"
21 .br
22 .ti -1c
23 .RI "int \fBhwloc_get_type_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
24 .br
25 .ti -1c
26 .RI "int \fBhwloc_get_memory_parents_depth\fP (\fBhwloc_topology_t\fP topology)"
27 .br
28 .ti -1c
29 .RI "int \fBhwloc_get_type_or_below_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
30 .br
31 .ti -1c
32 .RI "int \fBhwloc_get_type_or_above_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
33 .br
34 .ti -1c
35 .RI "\fBhwloc_obj_type_t\fP \fBhwloc_get_depth_type\fP (\fBhwloc_topology_t\fP topology, int depth)"
36 .br
37 .ti -1c
38 .RI "unsigned \fBhwloc_get_nbobjs_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth)"
39 .br
40 .ti -1c
41 .RI "int \fBhwloc_get_nbobjs_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
42 .br
43 .ti -1c
44 .RI "\fBhwloc_obj_t\fP \fBhwloc_get_root_obj\fP (\fBhwloc_topology_t\fP topology)"
45 .br
46 .ti -1c
47 .RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth, unsigned idx)"
48 .br
49 .ti -1c
50 .RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, unsigned idx)"
51 .br
52 .ti -1c
53 .RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP prev)"
54 .br
55 .ti -1c
56 .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)"
57 .br
58 .in -1c
59 .SH "Detailed Description"
60 .PP
61 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\&.
62 .SH "Enumeration Type Documentation"
63 .PP
64 .SS "enum \fBhwloc_get_type_depth_e\fP"
65
66 .PP
67 \fBEnumerator\fP
68 .in +1c
69 .TP
70 \f(BIHWLOC_TYPE_DEPTH_UNKNOWN \fP
71 No object of given type exists in the topology\&.
72 .TP
73 \f(BIHWLOC_TYPE_DEPTH_MULTIPLE \fP
74 Objects of given type exist at different depth in the topology (only for Groups)\&.
75 .TP
76 \f(BIHWLOC_TYPE_DEPTH_NUMANODE \fP
77 Virtual depth for NUMA nodes\&.
78 .TP
79 \f(BIHWLOC_TYPE_DEPTH_BRIDGE \fP
80 Virtual depth for bridge object level\&.
81 .TP
82 \f(BIHWLOC_TYPE_DEPTH_PCI_DEVICE \fP
83 Virtual depth for PCI device object level\&.
84 .TP
85 \f(BIHWLOC_TYPE_DEPTH_OS_DEVICE \fP
86 Virtual depth for software device object level\&.
87 .TP
88 \f(BIHWLOC_TYPE_DEPTH_MISC \fP
89 Virtual depth for Misc object\&.
90 .TP
91 \f(BIHWLOC_TYPE_DEPTH_MEMCACHE \fP
92 Virtual depth for MemCache object\&.
93 .SH "Function Documentation"
94 .PP
95 .SS "\fBhwloc_obj_type_t\fP hwloc_get_depth_type (\fBhwloc_topology_t\fP topology, int depth)"
96
97 .PP
98 Returns the type of objects at depth \fRdepth\fP\&. \fRdepth\fP should between 0 and \fBhwloc_topology_get_depth()\fP-1, or a virtual depth such as \fBHWLOC_TYPE_DEPTH_NUMANODE\fP\&.
99
100 .PP
101 \fBReturns\fP
102 .RS 4
103 The type of objects at depth \fRdepth\fP\&.
104
105 .PP
106 (\fBhwloc_obj_type_t\fP)-1 if depth \fRdepth\fP does not exist\&.
107 .RE
108 .PP
109
110 .SS "int hwloc_get_memory_parents_depth (\fBhwloc_topology_t\fP topology)"
111
112 .PP
113 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\&.
114
115 .PP
116 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\&.
117
118 .PP
119 \fBReturns\fP
120 .RS 4
121 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\&.
122
123 .PP
124 \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\&.
125 .RE
126 .PP
127
128 .SS "unsigned hwloc_get_nbobjs_by_depth (\fBhwloc_topology_t\fP topology, int depth)"
129
130 .PP
131 Returns the width of level at depth \fRdepth\fP\&.
132 .PP
133 \fBReturns\fP
134 .RS 4
135 The number of objects at topology depth \fRdepth\fP\&.
136
137 .PP
138 0 if there are no objects at depth \fRdepth\fP\&.
139 .RE
140 .PP
141
142 .SS "int hwloc_get_nbobjs_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fR [inline]\fP"
143
144 .PP
145 Returns the width of level type \fRtype\fP\&.
146 .PP
147 \fBReturns\fP
148 .RS 4
149 The number of objects of type \fRtype\fP\&.
150
151 .PP
152 -1 if there are multiple levels with objects of that type, e\&.g\&. \fBHWLOC_OBJ_GROUP\fP\&.
153
154 .PP
155 0 if there are no objects at depth \fRdepth\fP\&.
156 .RE
157 .PP
158
159 .SS "\fBhwloc_obj_t\fP hwloc_get_next_obj_by_depth (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP prev)\fR [inline]\fP"
160
161 .PP
162 Returns the next object at depth \fRdepth\fP\&.
163 .PP
164 \fBReturns\fP
165 .RS 4
166 The first object at depth \fRdepth\fP if \fRprev\fP is \fRNULL\fP\&.
167
168 .PP
169 The object after \fRprev\fP at depth \fRdepth\fP if \fRprev\fP is not \fRNULL\fP\&.
170
171 .PP
172 \fRNULL\fP if there is no such object\&.
173 .RE
174 .PP
175
176 .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)\fR [inline]\fP"
177
178 .PP
179 Returns the next object of type \fRtype\fP\&.
180 .PP
181 \fBReturns\fP
182 .RS 4
183 The first object of type \fRtype\fP if \fRprev\fP is \fRNULL\fP\&.
184
185 .PP
186 The object after \fRprev\fP of type \fRtype\fP if \fRprev\fP is not \fRNULL\fP\&.
187
188 .PP
189 \fRNULL\fP if there is no such object\&.
190
191 .PP
192 \fRNULL\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\&.
193 .RE
194 .PP
195
196 .SS "\fBhwloc_obj_t\fP hwloc_get_obj_by_depth (\fBhwloc_topology_t\fP topology, int depth, unsigned idx)"
197
198 .PP
199 Returns the topology object at logical index \fRidx\fP from depth \fRdepth\fP\&.
200 .PP
201 \fBReturns\fP
202 .RS 4
203 The object if it exists\&.
204
205 .PP
206 \fRNULL\fP if there is no object with this index and depth\&.
207 .RE
208 .PP
209
210 .SS "\fBhwloc_obj_t\fP hwloc_get_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, unsigned idx)\fR [inline]\fP"
211
212 .PP
213 Returns the topology object at logical index \fRidx\fP with type \fRtype\fP\&.
214 .PP
215 \fBReturns\fP
216 .RS 4
217 The object if it exists\&.
218
219 .PP
220 \fRNULL\fP if there is no object with this index and type\&.
221
222 .PP
223 \fRNULL\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\&.
224 .RE
225 .PP
226
227 .SS "\fBhwloc_obj_t\fP hwloc_get_root_obj (\fBhwloc_topology_t\fP topology)\fR [inline]\fP"
228
229 .PP
230 Returns the top-object of the topology-tree\&. Its type is \fBHWLOC_OBJ_MACHINE\fP\&.
231
232 .PP
233 This function cannot return \fRNULL\fP\&.
234 .SS "int hwloc_get_type_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
235
236 .PP
237 Returns the depth of objects of type \fRtype\fP\&.
238 .PP
239 \fBReturns\fP
240 .RS 4
241 The depth of objects of type \fRtype\fP\&.
242
243 .PP
244 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\&.
245
246 .PP
247 \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\&.
248
249 .PP
250 \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP if type \fBHWLOC_OBJ_GROUP\fP is given and multiple levels of Groups exist\&.
251 .RE
252 .PP
253 \fBNote\fP
254 .RS 4
255 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\&.
256 .RE
257 .PP
258 \fBSee also\fP
259 .RS 4
260 \fBhwloc_get_memory_parents_depth()\fP for managing the depth of memory objects\&.
261
262 .PP
263 \fBhwloc_type_sscanf_as_depth()\fP for returning the depth of objects whose type is given as a string\&.
264 .RE
265 .PP
266
267 .SS "int hwloc_get_type_or_above_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fR [inline]\fP"
268
269 .PP
270 Returns the depth of objects of type \fRtype\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 \fRtype\fP\&.
271
272 .PP
273 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)\&.
274
275 .PP
276 May return \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP for \fBHWLOC_OBJ_GROUP\fP just like \fBhwloc_get_type_depth()\fP\&.
277 .SS "int hwloc_get_type_or_below_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fR [inline]\fP"
278
279 .PP
280 Returns the depth of objects of type \fRtype\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 \fRtype\fP\&.
281
282 .PP
283 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)\&.
284
285 .PP
286 May return \fBHWLOC_TYPE_DEPTH_MULTIPLE\fP for \fBHWLOC_OBJ_GROUP\fP just like \fBhwloc_get_type_depth()\fP\&.
287 .SS "int hwloc_topology_get_depth (\fBhwloc_topology_t\fP restrict topology)"
288
289 .PP
290 Get the depth of the hierarchical tree of objects\&. This is the depth of \fBHWLOC_OBJ_PU\fP objects plus one\&.
291
292 .PP
293 \fBReturns\fP
294 .RS 4
295 the depth of the object tree\&.
296 .RE
297 .PP
298 \fBNote\fP
299 .RS 4
300 NUMA nodes, I/O and Misc objects are ignored when computing the depth of the tree (they are placed on special levels)\&.
301 .RE
302 .PP
303
304 .SH "Author"
305 .PP
306 Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.