1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
.TH "hwlocality_linux_libnuma_ulongs" 3 "Version 2.12.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_linux_libnuma_ulongs \- Interoperability with Linux libnuma unsigned long masks
.SH SYNOPSIS
.br
.PP
.SS "Functions"
.in +1c
.ti -1c
.RI "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 "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 "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 "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
\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 "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"
.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)\&.
.PP
\fBReturns\fP
.RS 4
0 on success\&.
.PP
-1 on error, for instance if failing an internal reallocation\&.
.RE
.PP
.SS "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"
.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\&.
.PP
\fBReturns\fP
.RS 4
0\&.
.RE
.PP
.SS "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"
.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)\&.
.PP
\fBReturns\fP
.RS 4
0 on success\&.
.PP
-1 with errno set to \fCENOMEM\fP if some internal reallocation failed\&.
.RE
.PP
.SS "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"
.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\&.
.PP
\fBReturns\fP
.RS 4
0\&.
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.
|