\hypertarget{group__hwlocality__creation}{\section{Create and Destroy Topologies}
\label{group__hwlocality__creation}\index{Create and Destroy Topologies@{Create and Destroy Topologies}}
}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{group__hwlocality__creation_ga5c2d6f476af87005c7bd0811d4548b9f}{hwloc\+\_\+topology\+\_\+init} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} $\ast$topologyp)
\begin{DoxyCompactList}\small\item\em Allocate a topology context. \end{DoxyCompactList}\item 
H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{group__hwlocality__creation_ga91e2e6427b95fb7339c99dbbef996e71}{hwloc\+\_\+topology\+\_\+load} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology)
\begin{DoxyCompactList}\small\item\em Build the actual topology. \end{DoxyCompactList}\item 
H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void \hyperlink{group__hwlocality__creation_ga6040925d3ee4bbb2647f2a321aca5f4b}{hwloc\+\_\+topology\+\_\+destroy} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology)
\begin{DoxyCompactList}\small\item\em Terminate and free a topology context. \end{DoxyCompactList}\item 
H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void \hyperlink{group__hwlocality__creation_gab3628b2a540a5a08e8cf724ef829e70a}{hwloc\+\_\+topology\+\_\+check} (\hyperlink{group__hwlocality__topology_ga9d1e76ee15a7dee158b786c30b6a6e38}{hwloc\+\_\+topology\+\_\+t} topology)
\begin{DoxyCompactList}\small\item\em Run internal checks on a topology structure. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\hypertarget{group__hwlocality__creation_gab3628b2a540a5a08e8cf724ef829e70a}{\index{Create and Destroy Topologies@{Create and Destroy Topologies}!hwloc\+\_\+topology\+\_\+check@{hwloc\+\_\+topology\+\_\+check}}
\index{hwloc\+\_\+topology\+\_\+check@{hwloc\+\_\+topology\+\_\+check}!Create and Destroy Topologies@{Create and Destroy Topologies}}
\subsubsection[{hwloc\+\_\+topology\+\_\+check}]{\setlength{\rightskip}{0pt plus 5cm}H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void hwloc\+\_\+topology\+\_\+check (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology}
\end{DoxyParamCaption}
)}}\label{group__hwlocality__creation_gab3628b2a540a5a08e8cf724ef829e70a}


Run internal checks on a topology structure. 

The program aborts if an inconsistency is detected in the given topology.


\begin{DoxyParams}{Parameters}
{\em topology} & is the topology to be checked\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
This routine is only useful to developers.

The input topology should have been previously loaded with \hyperlink{group__hwlocality__creation_ga91e2e6427b95fb7339c99dbbef996e71}{hwloc\+\_\+topology\+\_\+load()}. 
\end{DoxyNote}
\hypertarget{group__hwlocality__creation_ga6040925d3ee4bbb2647f2a321aca5f4b}{\index{Create and Destroy Topologies@{Create and Destroy Topologies}!hwloc\+\_\+topology\+\_\+destroy@{hwloc\+\_\+topology\+\_\+destroy}}
\index{hwloc\+\_\+topology\+\_\+destroy@{hwloc\+\_\+topology\+\_\+destroy}!Create and Destroy Topologies@{Create and Destroy Topologies}}
\subsubsection[{hwloc\+\_\+topology\+\_\+destroy}]{\setlength{\rightskip}{0pt plus 5cm}H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void hwloc\+\_\+topology\+\_\+destroy (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology}
\end{DoxyParamCaption}
)}}\label{group__hwlocality__creation_ga6040925d3ee4bbb2647f2a321aca5f4b}


Terminate and free a topology context. 


\begin{DoxyParams}{Parameters}
{\em topology} & is the topology to be freed \\
\hline
\end{DoxyParams}
\hypertarget{group__hwlocality__creation_ga5c2d6f476af87005c7bd0811d4548b9f}{\index{Create and Destroy Topologies@{Create and Destroy Topologies}!hwloc\+\_\+topology\+\_\+init@{hwloc\+\_\+topology\+\_\+init}}
\index{hwloc\+\_\+topology\+\_\+init@{hwloc\+\_\+topology\+\_\+init}!Create and Destroy Topologies@{Create and Destroy Topologies}}
\subsubsection[{hwloc\+\_\+topology\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int hwloc\+\_\+topology\+\_\+init (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t} $\ast$}]{topologyp}
\end{DoxyParamCaption}
)}}\label{group__hwlocality__creation_ga5c2d6f476af87005c7bd0811d4548b9f}


Allocate a topology context. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em topologyp} & is assigned a pointer to the new allocated context.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on error. 
\end{DoxyReturn}
\hypertarget{group__hwlocality__creation_ga91e2e6427b95fb7339c99dbbef996e71}{\index{Create and Destroy Topologies@{Create and Destroy Topologies}!hwloc\+\_\+topology\+\_\+load@{hwloc\+\_\+topology\+\_\+load}}
\index{hwloc\+\_\+topology\+\_\+load@{hwloc\+\_\+topology\+\_\+load}!Create and Destroy Topologies@{Create and Destroy Topologies}}
\subsubsection[{hwloc\+\_\+topology\+\_\+load}]{\setlength{\rightskip}{0pt plus 5cm}H\+W\+L\+O\+C\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int hwloc\+\_\+topology\+\_\+load (
\begin{DoxyParamCaption}
\item[{{\bf hwloc\+\_\+topology\+\_\+t}}]{topology}
\end{DoxyParamCaption}
)}}\label{group__hwlocality__creation_ga91e2e6427b95fb7339c99dbbef996e71}


Build the actual topology. 

Build the actual topology once initialized with \hyperlink{group__hwlocality__creation_ga5c2d6f476af87005c7bd0811d4548b9f}{hwloc\+\_\+topology\+\_\+init()} and tuned with \hyperlink{group__hwlocality__configuration}{Configure Topology Detection} routines. No other routine may be called earlier using this topology context.


\begin{DoxyParams}{Parameters}
{\em topology} & is the topology to be loaded with objects.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__hwlocality__configuration}{Configure Topology Detection} 
\end{DoxySeeAlso}
