\hypertarget{group__hwlocality__helper__traversal__basic}{\section{Basic Traversal Helpers}
\label{group__hwlocality__helper__traversal__basic}\index{Basic Traversal Helpers@{Basic Traversal Helpers}}
}


Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \\*
\hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_ga632edae4a651996895ebde85ea2c1264}{hwloc\+\_\+get\+\_\+root\+\_\+obj} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology)
\begin{DoxyCompactList}\small\item\em Returns the top-\/object of the topology-\/tree. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \\*
\hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_gafa813c4ff8d610b3e158224a56386b2f}{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, unsigned depth, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} obj)
\begin{DoxyCompactList}\small\item\em Returns the ancestor object of {\ttfamily obj} at depth {\ttfamily depth}. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \\*
\hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_ga20ade151cb33991b4cd960924a830764}{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, \hyperlink{group__hwlocality__types_gacd37bb612667dc437d66bfb175a8dc55}{hwloc\+\_\+obj\+\_\+type\+\_\+t} type, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} obj)
\begin{DoxyCompactList}\small\item\em Returns the ancestor object of {\ttfamily obj} with type {\ttfamily type}. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \hyperlink{group__hwlocality__helper__traversal__basic_gab7c1dce3f42ece5bfa621e87cf332418}{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology, unsigned depth, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} prev)
\begin{DoxyCompactList}\small\item\em Returns the next object at depth {\ttfamily depth}. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \hyperlink{group__hwlocality__helper__traversal__basic_ga5f08ceb69375341e73563cfe2e77534e}{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology, \hyperlink{group__hwlocality__types_gacd37bb612667dc437d66bfb175a8dc55}{hwloc\+\_\+obj\+\_\+type\+\_\+t} type, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} prev)
\begin{DoxyCompactList}\small\item\em Returns the next object of type {\ttfamily type}. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \\*
\hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_ga61e00b83e7e0a1a946dc1bb29c49ccba}{hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology, unsigned os\+\_\+index)
\begin{DoxyCompactList}\small\item\em Returns the object of type \hyperlink{group__hwlocality__types_ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661}{H\+W\+L\+O\+C\+\_\+\+O\+B\+J\+\_\+\+P\+U} with {\ttfamily os\+\_\+index}. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \hyperlink{group__hwlocality__helper__traversal__basic_gae5ef1af636849f77714e1584ba78cf9c}{hwloc\+\_\+get\+\_\+next\+\_\+child} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} parent, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} prev)
\begin{DoxyCompactList}\small\item\em Return the next child. \end{DoxyCompactList}\item 
\hypertarget{group__hwlocality__helper__traversal__basic_gac574b7b06d2d937002dd538e08dbd554}{static \+\_\+\+\_\+hwloc\+\_\+inline \\*
\hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_gac574b7b06d2d937002dd538e08dbd554}{hwloc\+\_\+get\+\_\+common\+\_\+ancestor\+\_\+obj} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} obj1, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} obj2)}\label{group__hwlocality__helper__traversal__basic_gac574b7b06d2d937002dd538e08dbd554}

\begin{DoxyCompactList}\small\item\em Returns the common parent object to objects lvl1 and lvl2. \end{DoxyCompactList}\item 
static \+\_\+\+\_\+hwloc\+\_\+inline int \\*
\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure \hyperlink{group__hwlocality__helper__traversal__basic_ga38d9bd3a7566d0e6b0ab95d652557707}{hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} obj, \hyperlink{group__hwlocality__objects_ga79b8ab56877ef99ac59b833203391c7d}{hwloc\+\_\+obj\+\_\+t} subtree\+\_\+root)
\begin{DoxyCompactList}\small\item\em Returns true if {\ttfamily obj} is inside the subtree beginning with {\ttfamily subtree\+\_\+root}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Be sure to see the figure in termsanddefs that shows a complete topology tree, including depths, child/sibling/cousin relationships, and an example of an asymmetric topology where one socket has fewer caches than its peers. 



\subsection{Function Documentation}
\hypertarget{group__hwlocality__helper__traversal__basic_gafa813c4ff8d610b3e158224a56386b2f}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth@{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth}}
\index{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth@{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+depth (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t} topology}]{\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, }
\item[{unsigned}]{depth, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_gafa813c4ff8d610b3e158224a56386b2f}


Returns the ancestor object of {\ttfamily obj} at depth {\ttfamily depth}. 



References hwloc\+\_\+obj\+::depth, and hwloc\+\_\+obj\+::parent.

\hypertarget{group__hwlocality__helper__traversal__basic_ga20ade151cb33991b4cd960924a830764}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type@{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type}}
\index{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type@{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure hwloc\+\_\+get\+\_\+ancestor\+\_\+obj\+\_\+by\+\_\+type (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t} topology}]{\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, }
\item[{{\bf hwloc\+\_\+obj\+\_\+type\+\_\+t}}]{type, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{obj}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_ga20ade151cb33991b4cd960924a830764}


Returns the ancestor object of {\ttfamily obj} with type {\ttfamily type}. 



References hwloc\+\_\+obj\+::parent, and hwloc\+\_\+obj\+::type.

\hypertarget{group__hwlocality__helper__traversal__basic_gae5ef1af636849f77714e1584ba78cf9c}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+next\+\_\+child@{hwloc\+\_\+get\+\_\+next\+\_\+child}}
\index{hwloc\+\_\+get\+\_\+next\+\_\+child@{hwloc\+\_\+get\+\_\+next\+\_\+child}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+next\+\_\+child}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} hwloc\+\_\+get\+\_\+next\+\_\+child (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t} topology}]{\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{parent, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{prev}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_gae5ef1af636849f77714e1584ba78cf9c}


Return the next child. 

If {\ttfamily prev} is {\ttfamily N\+U\+L\+L}, return the first child. 

References hwloc\+\_\+obj\+::first\+\_\+child, hwloc\+\_\+obj\+::next\+\_\+sibling, and hwloc\+\_\+obj\+::parent.



Referenced by hwloc\+\_\+get\+\_\+first\+\_\+largest\+\_\+obj\+\_\+inside\+\_\+cpuset().

\hypertarget{group__hwlocality__helper__traversal__basic_gab7c1dce3f42ece5bfa621e87cf332418}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth@{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth}}
\index{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth@{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology, }
\item[{unsigned}]{depth, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{prev}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_gab7c1dce3f42ece5bfa621e87cf332418}


Returns the next object at depth {\ttfamily depth}. 

If {\ttfamily prev} is {\ttfamily N\+U\+L\+L}, return the first object at depth {\ttfamily depth}. 

References hwloc\+\_\+obj\+::depth, hwloc\+\_\+get\+\_\+obj\+\_\+by\+\_\+depth(), and hwloc\+\_\+obj\+::next\+\_\+cousin.



Referenced by hwloc\+\_\+cpuset\+\_\+from\+\_\+nodeset(), hwloc\+\_\+cpuset\+\_\+from\+\_\+nodeset\+\_\+strict(), hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type(), hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+covering\+\_\+cpuset\+\_\+by\+\_\+depth(), and hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+inside\+\_\+cpuset\+\_\+by\+\_\+depth().

\hypertarget{group__hwlocality__helper__traversal__basic_ga5f08ceb69375341e73563cfe2e77534e}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type@{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type}}
\index{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type@{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology, }
\item[{{\bf hwloc\+\_\+obj\+\_\+type\+\_\+t}}]{type, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{prev}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_ga5f08ceb69375341e73563cfe2e77534e}


Returns the next object of type {\ttfamily type}. 

If {\ttfamily prev} is {\ttfamily N\+U\+L\+L}, return the first object at type {\ttfamily type}. If there are multiple or no depth for given type, return {\ttfamily N\+U\+L\+L} and let the caller fallback to \hyperlink{group__hwlocality__helper__traversal__basic_gab7c1dce3f42ece5bfa621e87cf332418}{hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth()}. 

References hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+depth(), hwloc\+\_\+get\+\_\+type\+\_\+depth(), H\+W\+L\+O\+C\+\_\+\+T\+Y\+P\+E\+\_\+\+D\+E\+P\+T\+H\+\_\+\+M\+U\+L\+T\+I\+P\+L\+E, and H\+W\+L\+O\+C\+\_\+\+T\+Y\+P\+E\+\_\+\+D\+E\+P\+T\+H\+\_\+\+U\+N\+K\+N\+O\+W\+N.



Referenced by hwloc\+\_\+get\+\_\+next\+\_\+bridge(), hwloc\+\_\+get\+\_\+next\+\_\+osdev(), hwloc\+\_\+get\+\_\+next\+\_\+pcidev(), hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index(), hwloc\+\_\+mx\+\_\+board\+\_\+get\+\_\+device\+\_\+cpuset(), hwloc\+\_\+nodeset\+\_\+to\+\_\+linux\+\_\+libnuma\+\_\+bitmask(), and hwloc\+\_\+nodeset\+\_\+to\+\_\+linux\+\_\+libnuma\+\_\+ulongs().

\hypertarget{group__hwlocality__helper__traversal__basic_ga61e00b83e7e0a1a946dc1bb29c49ccba}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index@{hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index}}
\index{hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index@{hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure hwloc\+\_\+get\+\_\+pu\+\_\+obj\+\_\+by\+\_\+os\+\_\+index (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology, }
\item[{unsigned}]{os\+\_\+index}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_ga61e00b83e7e0a1a946dc1bb29c49ccba}


Returns the object of type \hyperlink{group__hwlocality__types_ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661}{H\+W\+L\+O\+C\+\_\+\+O\+B\+J\+\_\+\+P\+U} with {\ttfamily os\+\_\+index}. 

\begin{DoxyNote}{Note}
The {\ttfamily os\+\_\+index} field of object should most of the times only be used for pretty-\/printing purpose. Type \hyperlink{group__hwlocality__types_ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661}{H\+W\+L\+O\+C\+\_\+\+O\+B\+J\+\_\+\+P\+U} is the only case where {\ttfamily os\+\_\+index} could actually be useful, when manually binding to processors. However, using C\+P\+U sets to hide this complexity should often be preferred. 
\end{DoxyNote}


References hwloc\+\_\+get\+\_\+next\+\_\+obj\+\_\+by\+\_\+type(), H\+W\+L\+O\+C\+\_\+\+O\+B\+J\+\_\+\+P\+U, and hwloc\+\_\+obj\+::os\+\_\+index.

\hypertarget{group__hwlocality__helper__traversal__basic_ga632edae4a651996895ebde85ea2c1264}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+get\+\_\+root\+\_\+obj@{hwloc\+\_\+get\+\_\+root\+\_\+obj}}
\index{hwloc\+\_\+get\+\_\+root\+\_\+obj@{hwloc\+\_\+get\+\_\+root\+\_\+obj}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+get\+\_\+root\+\_\+obj}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline {\bf hwloc\+\_\+obj\+\_\+t} \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure hwloc\+\_\+get\+\_\+root\+\_\+obj (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_ga632edae4a651996895ebde85ea2c1264}


Returns the top-\/object of the topology-\/tree. 

Its type is typically \hyperlink{group__hwlocality__types_ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80}{H\+W\+L\+O\+C\+\_\+\+O\+B\+J\+\_\+\+M\+A\+C\+H\+I\+N\+E} but it could be different for complex topologies. This function replaces the old deprecated hwloc\+\_\+get\+\_\+system\+\_\+obj(). 

References hwloc\+\_\+get\+\_\+obj\+\_\+by\+\_\+depth().



Referenced by hwloc\+\_\+get\+\_\+first\+\_\+largest\+\_\+obj\+\_\+inside\+\_\+cpuset(), hwloc\+\_\+get\+\_\+obj\+\_\+below\+\_\+array\+\_\+by\+\_\+type(), hwloc\+\_\+get\+\_\+obj\+\_\+covering\+\_\+cpuset(), hwloc\+\_\+get\+\_\+whole\+\_\+distance\+\_\+matrix\+\_\+by\+\_\+depth(), hwloc\+\_\+topology\+\_\+get\+\_\+allowed\+\_\+cpuset(), hwloc\+\_\+topology\+\_\+get\+\_\+allowed\+\_\+nodeset(), hwloc\+\_\+topology\+\_\+get\+\_\+complete\+\_\+cpuset(), hwloc\+\_\+topology\+\_\+get\+\_\+complete\+\_\+nodeset(), hwloc\+\_\+topology\+\_\+get\+\_\+online\+\_\+cpuset(), hwloc\+\_\+topology\+\_\+get\+\_\+topology\+\_\+cpuset(), hwloc\+\_\+topology\+\_\+get\+\_\+topology\+\_\+nodeset(), ompi\+\_\+mpi\+\_\+init(), and orte\+\_\+ess\+\_\+base\+\_\+orted\+\_\+setup().

\hypertarget{group__hwlocality__helper__traversal__basic_ga38d9bd3a7566d0e6b0ab95d652557707}{\index{Basic Traversal Helpers@{Basic Traversal Helpers}!hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree@{hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree}}
\index{hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree@{hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree}!Basic Traversal Helpers@{Basic Traversal Helpers}}
\subsubsection[{hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree}]{\setlength{\rightskip}{0pt plus 5cm}static \+\_\+\+\_\+hwloc\+\_\+inline int \+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+pure hwloc\+\_\+obj\+\_\+is\+\_\+in\+\_\+subtree (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t} topology}]{\+\_\+\+\_\+hwloc\+\_\+attribute\+\_\+unused, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{obj, }
\item[{{\bf hwloc\+\_\+obj\+\_\+t}}]{subtree\+\_\+root}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{group__hwlocality__helper__traversal__basic_ga38d9bd3a7566d0e6b0ab95d652557707}


Returns true if {\ttfamily obj} is inside the subtree beginning with {\ttfamily subtree\+\_\+root}. 

\begin{DoxyNote}{Note}
This function assumes that both {\ttfamily obj} and {\ttfamily subtree\+\_\+root} have a {\ttfamily cpuset}. 
\end{DoxyNote}


References hwloc\+\_\+obj\+::cpuset, and hwloc\+\_\+bitmap\+\_\+isincluded().

