File: hwlocality_helper_find_inside.3

package info (click to toggle)
hwloc 2.12.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • 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 (225 lines) | stat: -rw-r--r-- 8,499 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
.TH "hwlocality_helper_find_inside" 3 "Version 2.12.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_helper_find_inside \- Finding Objects inside a CPU set
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_first_largest_obj_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.br
.ti -1c
.RI "int \fBhwloc_get_largest_objs_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP *restrict objs, int max)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, int depth, \fBhwloc_obj_t\fP prev)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, int depth, unsigned idx)"
.br
.ti -1c
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)"
.br
.ti -1c
.RI "unsigned \fBhwloc_get_nbobjs_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, int depth)"
.br
.ti -1c
.RI "int \fBhwloc_get_nbobjs_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "int \fBhwloc_get_obj_index_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP obj)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "Function Documentation"
.PP 
.SS "\fBhwloc_obj_t\fP hwloc_get_first_largest_obj_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [inline]\fP"

.PP
Get the first largest object included in the given cpuset \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the first object that is included in \fCset\fP and whose parent is not\&. 
.PP
\fCNULL\fP if no such object exists\&.
.RE
.PP
This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set\&. 
.SS "int hwloc_get_largest_objs_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP *restrict objs, int max)"

.PP
Get the set of largest objects covering exactly a given cpuset \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the number of objects returned in \fCobjs\fP\&. 
.PP
-1 if no set of objects may cover that cpuset\&. 
.RE
.PP

.SS "unsigned hwloc_get_nbobjs_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, int depth)\fC [inline]\fP"

.PP
Return the number of objects at depth \fCdepth\fP included in CPU set \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the number of objects\&. 
.PP
0 if the depth is invalid\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects)\&. 
.RE
.PP

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

.PP
Return the number of objects of type \fCtype\fP included in CPU set \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the number of objects\&. 
.PP
0 if there are no objects of that type in the topology\&. 
.PP
-1 if there are multiple levels of objects of that type, the caller should fallback to \fBhwloc_get_nbobjs_inside_cpuset_by_depth()\fP\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects of the given type do not have CPU sets (I/O objects)\&. 
.RE
.PP

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

.PP
Return the next object at depth \fCdepth\fP included in CPU set \fCset\fP\&. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object in \fCset\fP\&.
.PP
\fBReturns\fP
.RS 4
the first object at depth \fCdepth\fP included in \fCset\fP if \fCprev\fP is \fCNULL\fP\&. 
.PP
the next object at depth \fCdepth\fP included in \fCset\fP if \fCprev\fP is not \fCNULL\fP\&. 
.PP
\fCNULL\fP if there is no next object\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects)\&. 
.RE
.PP

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

.PP
Return the next object of type \fCtype\fP included in CPU set \fCset\fP\&. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object in \fCset\fP\&.
.PP
\fBReturns\fP
.RS 4
the first object of type \fCtype\fP included in \fCset\fP if \fCprev\fP is \fCNULL\fP\&. 
.PP
the next object of type \fCtype\fP included in \fCset\fP if \fCprev\fP is not \fCNULL\fP\&. 
.PP
\fCNULL\fP if there is no next object\&. 
.PP
\fCNULL\fP if there is no depth for the given type\&. 
.PP
\fCNULL\fP if there are multiple depths for the given type, the caller should fallback to \fBhwloc_get_next_obj_inside_cpuset_by_depth()\fP\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects of the given type do not have CPU sets (I/O or Misc objects)\&. 
.RE
.PP

.SS "int hwloc_get_obj_index_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP obj)\fC [inline]\fP"

.PP
Return the logical index among the objects included in CPU set \fCset\fP\&. Consult all objects in the same level as \fCobj\fP and inside CPU set \fCset\fP in the logical order, and return the index of \fCobj\fP within them\&. If \fCset\fP covers the entire topology, this is the logical index of \fCobj\fP\&. Otherwise, this is similar to a logical index within the part of the topology defined by CPU set \fCset\fP\&.
.PP
\fBReturns\fP
.RS 4
the logical index among the objects included in the set if any\&. 
.PP
-1 if the object is not included in the set\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if obj does not have CPU sets (I/O objects)\&. 
.RE
.PP

.SS "\fBhwloc_obj_t\fP hwloc_get_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, int depth, unsigned idx)\fC [inline]\fP"

.PP
Return the (logically) \fCidx\fP -th object at depth \fCdepth\fP included in CPU set \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the object if any, \fCNULL\fP otherwise\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects at the given depth do not have CPU sets (I/O or Misc objects)\&. 
.RE
.PP

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

.PP
Return the \fCidx\fP -th object of type \fCtype\fP included in CPU set \fCset\fP\&. 
.PP
\fBReturns\fP
.RS 4
the object if any\&. 
.PP
\fCNULL\fP if there is no such object\&. 
.PP
\fCNULL\fP if there is no depth for given type\&. 
.PP
\fCNULL\fP if there are multiple depths for given type, the caller should fallback to \fBhwloc_get_obj_inside_cpuset_by_depth()\fP\&.
.RE
.PP
\fBNote\fP
.RS 4
Objects with empty CPU sets are ignored (otherwise they would be considered included in any given set)\&.
.PP
This function cannot work if objects of the given type do not have CPU sets (I/O or Misc objects)\&. 
.RE
.PP

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