\hypertarget{group__hwlocality__sets}{\section{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}
\label{group__hwlocality__sets}\index{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}}
}


Hwloc uses bitmaps to represent two distinct kinds of object sets\+: C\+P\+U sets (\hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t}) and N\+U\+M\+A node sets (\hyperlink{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{hwloc\+\_\+nodeset\+\_\+t}).  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{group__hwlocality__bitmap_gaa3c2bf4c776d603dcebbb61b0c923d84}{hwloc\+\_\+bitmap\+\_\+t} \hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t}
\begin{DoxyCompactList}\small\item\em A C\+P\+U set is a bitmap whose bits are set according to C\+P\+U physical O\+S indexes. \end{DoxyCompactList}\item 
typedef \hyperlink{group__hwlocality__bitmap_gae991a108af01d408be2776c5b2c467b2}{hwloc\+\_\+const\+\_\+bitmap\+\_\+t} \hyperlink{group__hwlocality__sets_ga1f784433e9b606261f62d1134f6a3b25}{hwloc\+\_\+const\+\_\+cpuset\+\_\+t}
\begin{DoxyCompactList}\small\item\em A non-\/modifiable \hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t}. \end{DoxyCompactList}\item 
typedef \hyperlink{group__hwlocality__bitmap_gaa3c2bf4c776d603dcebbb61b0c923d84}{hwloc\+\_\+bitmap\+\_\+t} \hyperlink{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{hwloc\+\_\+nodeset\+\_\+t}
\begin{DoxyCompactList}\small\item\em A node set is a bitmap whose bits are set according to N\+U\+M\+A memory node physical O\+S indexes. \end{DoxyCompactList}\item 
\hypertarget{group__hwlocality__sets_ga2f5276235841ad66a79bedad16a5a10c}{typedef \hyperlink{group__hwlocality__bitmap_gae991a108af01d408be2776c5b2c467b2}{hwloc\+\_\+const\+\_\+bitmap\+\_\+t} \hyperlink{group__hwlocality__sets_ga2f5276235841ad66a79bedad16a5a10c}{hwloc\+\_\+const\+\_\+nodeset\+\_\+t}}\label{group__hwlocality__sets_ga2f5276235841ad66a79bedad16a5a10c}

\begin{DoxyCompactList}\small\item\em A non-\/modifiable \hyperlink{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{hwloc\+\_\+nodeset\+\_\+t}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Hwloc uses bitmaps to represent two distinct kinds of object sets\+: C\+P\+U sets (\hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t}) and N\+U\+M\+A node sets (\hyperlink{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{hwloc\+\_\+nodeset\+\_\+t}). 

These types are both typedefs to a common back end type (\hyperlink{group__hwlocality__bitmap_gaa3c2bf4c776d603dcebbb61b0c923d84}{hwloc\+\_\+bitmap\+\_\+t}), and therefore all the hwloc bitmap functions are applicable to both \hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t} and \hyperlink{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{hwloc\+\_\+nodeset\+\_\+t} (see \hyperlink{group__hwlocality__bitmap}{The bitmap A\+P\+I}).

The rationale for having two different types is that even though the actions one wants to perform on these types are the same (e.\+g., enable and disable individual items in the set/mask), they're used in very different contexts\+: one for specifying which processors to use and one for specifying which N\+U\+M\+A nodes to use. Hence, the name difference is really just to reflect the intent of where the type is used. 

\subsection{Typedef Documentation}
\hypertarget{group__hwlocality__sets_ga1f784433e9b606261f62d1134f6a3b25}{\index{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}!hwloc\+\_\+const\+\_\+cpuset\+\_\+t@{hwloc\+\_\+const\+\_\+cpuset\+\_\+t}}
\index{hwloc\+\_\+const\+\_\+cpuset\+\_\+t@{hwloc\+\_\+const\+\_\+cpuset\+\_\+t}!Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}}
\subsubsection[{hwloc\+\_\+const\+\_\+cpuset\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf hwloc\+\_\+const\+\_\+bitmap\+\_\+t} {\bf hwloc\+\_\+const\+\_\+cpuset\+\_\+t}}}\label{group__hwlocality__sets_ga1f784433e9b606261f62d1134f6a3b25}


A non-\/modifiable \hyperlink{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{hwloc\+\_\+cpuset\+\_\+t}. 

\hypertarget{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}{\index{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}!hwloc\+\_\+cpuset\+\_\+t@{hwloc\+\_\+cpuset\+\_\+t}}
\index{hwloc\+\_\+cpuset\+\_\+t@{hwloc\+\_\+cpuset\+\_\+t}!Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}}
\subsubsection[{hwloc\+\_\+cpuset\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf hwloc\+\_\+bitmap\+\_\+t} {\bf hwloc\+\_\+cpuset\+\_\+t}}}\label{group__hwlocality__sets_ga4bbf39b68b6f568fb92739e7c0ea7801}


A C\+P\+U set is a bitmap whose bits are set according to C\+P\+U physical O\+S indexes. 

It may be consulted and modified with the bitmap A\+P\+I as any \hyperlink{group__hwlocality__bitmap_gaa3c2bf4c776d603dcebbb61b0c923d84}{hwloc\+\_\+bitmap\+\_\+t} (see \hyperlink{bitmap_8h}{hwloc/bitmap.\+h}). \hypertarget{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}{\index{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}!hwloc\+\_\+nodeset\+\_\+t@{hwloc\+\_\+nodeset\+\_\+t}}
\index{hwloc\+\_\+nodeset\+\_\+t@{hwloc\+\_\+nodeset\+\_\+t}!Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)@{Object sets (hwloc\+\_\+cpuset\+\_\+t and hwloc\+\_\+nodeset\+\_\+t)}}
\subsubsection[{hwloc\+\_\+nodeset\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf hwloc\+\_\+bitmap\+\_\+t} {\bf hwloc\+\_\+nodeset\+\_\+t}}}\label{group__hwlocality__sets_ga37e35730fa7e775b5bb0afe893d6d508}


A node set is a bitmap whose bits are set according to N\+U\+M\+A memory node physical O\+S indexes. 

It may be consulted and modified with the bitmap A\+P\+I as any \hyperlink{group__hwlocality__bitmap_gaa3c2bf4c776d603dcebbb61b0c923d84}{hwloc\+\_\+bitmap\+\_\+t} (see \hyperlink{bitmap_8h}{hwloc/bitmap.\+h}).

When binding memory on a system without any N\+U\+M\+A node (when the whole memory is considered as a single memory bank), the nodeset may be either empty (no memory selected) or full (whole system memory selected).

See also \hyperlink{group__hwlocality__helper__nodeset__convert}{Conversion between cpuset and nodeset}. 