| 1 |
.TH "hwlocality_helper_ancestors" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*- |
| 2 |
.ad l |
| 3 |
.nh |
| 4 |
.SH NAME |
| 5 |
hwlocality_helper_ancestors \- Looking at Ancestor and Child Objects |
| 6 |
.SH SYNOPSIS |
| 7 |
.br |
| 8 |
.PP |
| 9 |
.SS "Functions" |
| 10 |
|
| 11 |
.in +1c |
| 12 |
.ti -1c |
| 13 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_ancestor_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP obj)" |
| 14 |
.br |
| 15 |
.ti -1c |
| 16 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_ancestor_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)" |
| 17 |
.br |
| 18 |
.ti -1c |
| 19 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_common_ancestor_obj\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)" |
| 20 |
.br |
| 21 |
.ti -1c |
| 22 |
.RI "int \fBhwloc_obj_is_in_subtree\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)" |
| 23 |
.br |
| 24 |
.ti -1c |
| 25 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_get_next_child\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)" |
| 26 |
.br |
| 27 |
.in -1c |
| 28 |
.SH "Detailed Description" |
| 29 |
.PP |
| 30 |
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\&. |
| 31 |
.SH "Function Documentation" |
| 32 |
.PP |
| 33 |
.SS "\fBhwloc_obj_t\fP hwloc_get_ancestor_obj_by_depth (\fBhwloc_topology_t\fP topology, int depth, \fBhwloc_obj_t\fP obj)\fR [inline]\fP" |
| 34 |
|
| 35 |
.PP |
| 36 |
Returns the ancestor object of \fRobj\fP at depth \fRdepth\fP\&. |
| 37 |
.PP |
| 38 |
\fBReturns\fP |
| 39 |
.RS 4 |
| 40 |
the ancestor if any\&. |
| 41 |
|
| 42 |
.PP |
| 43 |
\fRNULL\fP if no such ancestor exists\&. |
| 44 |
.RE |
| 45 |
.PP |
| 46 |
\fBNote\fP |
| 47 |
.RS 4 |
| 48 |
\fRdepth\fP should not be the depth of PU or NUMA objects since they are ancestors of no objects (except Misc or I/O)\&. This function rather expects an intermediate level depth, such as the depth of Packages, Cores, or Caches\&. |
| 49 |
.RE |
| 50 |
.PP |
| 51 |
|
| 52 |
.SS "\fBhwloc_obj_t\fP hwloc_get_ancestor_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)\fR [inline]\fP" |
| 53 |
|
| 54 |
.PP |
| 55 |
Returns the ancestor object of \fRobj\fP with type \fRtype\fP\&. |
| 56 |
.PP |
| 57 |
\fBReturns\fP |
| 58 |
.RS 4 |
| 59 |
the ancestor if any\&. |
| 60 |
|
| 61 |
.PP |
| 62 |
\fRNULL\fP if no such ancestor exists\&. |
| 63 |
.RE |
| 64 |
.PP |
| 65 |
\fBNote\fP |
| 66 |
.RS 4 |
| 67 |
if multiple matching ancestors exist (e\&.g\&. multiple levels of \fBHWLOC_OBJ_GROUP\fP) the lowest one is returned\&. |
| 68 |
|
| 69 |
.PP |
| 70 |
\fRtype\fP should not be \fBHWLOC_OBJ_PU\fP or \fBHWLOC_OBJ_NUMANODE\fP since these objects are ancestors of no objects (except Misc or I/O)\&. This function rather expects an intermediate object type, such as \fBHWLOC_OBJ_PACKAGE\fP, \fBHWLOC_OBJ_CORE\fP, etc\&. |
| 71 |
.RE |
| 72 |
.PP |
| 73 |
|
| 74 |
.SS "\fBhwloc_obj_t\fP hwloc_get_common_ancestor_obj (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)\fR [inline]\fP" |
| 75 |
|
| 76 |
.PP |
| 77 |
Returns the common parent object to objects \fRobj1\fP and \fRobj2\fP\&. |
| 78 |
.PP |
| 79 |
\fBReturns\fP |
| 80 |
.RS 4 |
| 81 |
the common ancestor\&. |
| 82 |
.RE |
| 83 |
.PP |
| 84 |
\fBNote\fP |
| 85 |
.RS 4 |
| 86 |
This function cannot return \fRNULL\fP\&. |
| 87 |
.RE |
| 88 |
.PP |
| 89 |
|
| 90 |
.SS "\fBhwloc_obj_t\fP hwloc_get_next_child (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)\fR [inline]\fP" |
| 91 |
|
| 92 |
.PP |
| 93 |
Return the next child\&. Return the next child among the normal children list, then among the memory children list, then among the I/O children list, then among the Misc children list\&. |
| 94 |
|
| 95 |
.PP |
| 96 |
\fBReturns\fP |
| 97 |
.RS 4 |
| 98 |
the first child if \fRprev\fP is \fRNULL\fP\&. |
| 99 |
|
| 100 |
.PP |
| 101 |
the next child if \fRprev\fP is not \fRNULL\fP\&. |
| 102 |
|
| 103 |
.PP |
| 104 |
\fRNULL\fP when there is no next child\&. |
| 105 |
.RE |
| 106 |
.PP |
| 107 |
|
| 108 |
.SS "int hwloc_obj_is_in_subtree (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)\fR [inline]\fP" |
| 109 |
|
| 110 |
.PP |
| 111 |
Returns true if \fRobj\fP is inside the subtree beginning with ancestor object \fRsubtree_root\fP\&. |
| 112 |
.PP |
| 113 |
\fBReturns\fP |
| 114 |
.RS 4 |
| 115 |
1 is the object is in the subtree, 0 otherwise\&. |
| 116 |
.RE |
| 117 |
.PP |
| 118 |
\fBNote\fP |
| 119 |
.RS 4 |
| 120 |
This function cannot work if \fRobj\fP and \fRsubtree_root\fP objects do not have CPU sets (I/O or Misc objects)\&. |
| 121 |
.RE |
| 122 |
.PP |
| 123 |
|
| 124 |
.SH "Author" |
| 125 |
.PP |
| 126 |
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&. |