.TH "hwlocality_linux_libnuma_ulongs" 3 "Fri Feb 8 2019" "Version 1.11.12" "Hardware Locality (hwloc)" \" -*- nroff -*- .ad l .nh .SH NAME hwlocality_linux_libnuma_ulongs .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "static int \fBhwloc_cpuset_to_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long *mask, unsigned long *maxnode)" .br .ti -1c .RI "static int \fBhwloc_nodeset_to_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset, unsigned long *mask, unsigned long *maxnode)" .br .ti -1c .RI "static int \fBhwloc_cpuset_from_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long *mask, unsigned long maxnode)" .br .ti -1c .RI "static int \fBhwloc_nodeset_from_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const unsigned long *mask, unsigned long maxnode)" .br .in -1c .SH "Detailed Description" .PP This interface helps converting between Linux libnuma unsigned long masks and hwloc cpusets and nodesets\&. .PP It also offers a consistent behavior on non-NUMA machines or non-NUMA-aware kernels by assuming that the machines have a single NUMA node\&. .PP \fBNote:\fP .RS 4 Topology \fCtopology\fP must match the current machine\&. .PP The behavior of libnuma is undefined if the kernel is not NUMA-aware\&. (when CONFIG_NUMA is not set in the kernel configuration)\&. This helper and libnuma may thus not be strictly compatible in this case, which may be detected by checking whether numa_available() returns -1\&. .RE .PP .SH "Function Documentation" .PP .SS "static int hwloc_cpuset_from_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long * mask, unsigned long maxnode)\fC [inline]\fP, \fC [static]\fP" .PP Convert the array of unsigned long \fCmask\fP into hwloc CPU set\&. \fCmask\fP is a array of unsigned long that will be read\&. \fCmaxnode\fP contains the maximal node number that may be read in \fCmask\fP\&. .PP This function may be used after calling get_mempolicy or any other function that takes an array of unsigned long as output parameter (and possibly a maximal node number as input parameter)\&. .SS "static int hwloc_cpuset_to_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long * mask, unsigned long * maxnode)\fC [inline]\fP, \fC [static]\fP" .PP Convert hwloc CPU set \fCcpuset\fP into the array of unsigned long \fCmask\fP\&. \fCmask\fP is the array of unsigned long that will be filled\&. \fCmaxnode\fP contains the maximal node number that may be stored in \fCmask\fP\&. \fCmaxnode\fP will be set to the maximal node number that was found, plus one\&. .PP This function may be used before calling set_mempolicy, mbind, migrate_pages or any other function that takes an array of unsigned long and a maximal node number as input parameter\&. .SS "static int hwloc_nodeset_from_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const unsigned long * mask, unsigned long maxnode)\fC [inline]\fP, \fC [static]\fP" .PP Convert the array of unsigned long \fCmask\fP into hwloc NUMA node set\&. \fCmask\fP is a array of unsigned long that will be read\&. \fCmaxnode\fP contains the maximal node number that may be read in \fCmask\fP\&. .PP This function may be used after calling get_mempolicy or any other function that takes an array of unsigned long as output parameter (and possibly a maximal node number as input parameter)\&. .SS "static int hwloc_nodeset_to_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset, unsigned long * mask, unsigned long * maxnode)\fC [inline]\fP, \fC [static]\fP" .PP Convert hwloc NUMA node set \fCnodeset\fP into the array of unsigned long \fCmask\fP\&. \fCmask\fP is the array of unsigned long that will be filled\&. \fCmaxnode\fP contains the maximal node number that may be stored in \fCmask\fP\&. \fCmaxnode\fP will be set to the maximal node number that was found, plus one\&. .PP This function may be used before calling set_mempolicy, mbind, migrate_pages or any other function that takes an array of unsigned long and a maximal node number as input parameter\&. .SH "Author" .PP Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.