| 1 |
.TH "hwlocality_linux_libnuma_bitmask" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*- |
| 2 |
.ad l |
| 3 |
.nh |
| 4 |
.SH NAME |
| 5 |
hwlocality_linux_libnuma_bitmask \- Interoperability with Linux libnuma bitmask |
| 6 |
.SH SYNOPSIS |
| 7 |
.br |
| 8 |
.PP |
| 9 |
.SS "Functions" |
| 10 |
|
| 11 |
.in +1c |
| 12 |
.ti -1c |
| 13 |
.RI "struct bitmask * \fBhwloc_cpuset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)" |
| 14 |
.br |
| 15 |
.ti -1c |
| 16 |
.RI "struct bitmask * \fBhwloc_nodeset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset)" |
| 17 |
.br |
| 18 |
.ti -1c |
| 19 |
.RI "int \fBhwloc_cpuset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask *bitmask)" |
| 20 |
.br |
| 21 |
.ti -1c |
| 22 |
.RI "int \fBhwloc_nodeset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const struct bitmask *bitmask)" |
| 23 |
.br |
| 24 |
.in -1c |
| 25 |
.SH "Detailed Description" |
| 26 |
.PP |
| 27 |
This interface helps converting between Linux libnuma bitmasks and hwloc cpusets and nodesets\&. |
| 28 |
|
| 29 |
.PP |
| 30 |
\fBNote\fP |
| 31 |
.RS 4 |
| 32 |
Topology \fRtopology\fP must match the current machine\&. |
| 33 |
|
| 34 |
.PP |
| 35 |
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\&. |
| 36 |
.RE |
| 37 |
.PP |
| 38 |
|
| 39 |
.SH "Function Documentation" |
| 40 |
.PP |
| 41 |
.SS "int hwloc_cpuset_from_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask * bitmask)\fR [inline]\fP" |
| 42 |
|
| 43 |
.PP |
| 44 |
Convert libnuma bitmask \fRbitmask\fP into hwloc CPU set \fRcpuset\fP\&. This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter\&. |
| 45 |
|
| 46 |
.PP |
| 47 |
\fBReturns\fP |
| 48 |
.RS 4 |
| 49 |
0 on success\&. |
| 50 |
|
| 51 |
.PP |
| 52 |
-1 with errno set to \fRENOMEM\fP if some internal reallocation failed\&. |
| 53 |
.RE |
| 54 |
.PP |
| 55 |
|
| 56 |
.SS "struct bitmask * hwloc_cpuset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)\fR [inline]\fP" |
| 57 |
|
| 58 |
.PP |
| 59 |
Convert hwloc CPU set \fRcpuset\fP into the returned libnuma bitmask\&. The returned bitmask should later be freed with numa_bitmask_free\&. |
| 60 |
|
| 61 |
.PP |
| 62 |
This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter\&. |
| 63 |
|
| 64 |
.PP |
| 65 |
\fBReturns\fP |
| 66 |
.RS 4 |
| 67 |
newly allocated struct bitmask, or \fRNULL\fP on error\&. |
| 68 |
.RE |
| 69 |
.PP |
| 70 |
\fBNote\fP |
| 71 |
.RS 4 |
| 72 |
On heterogeneous memory platforms, we may return multiple local NUMA nodes even if libnuma reports only one (usually the first one)\&. |
| 73 |
.RE |
| 74 |
.PP |
| 75 |
|
| 76 |
.SS "int hwloc_nodeset_from_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const struct bitmask * bitmask)\fR [inline]\fP" |
| 77 |
|
| 78 |
.PP |
| 79 |
Convert libnuma bitmask \fRbitmask\fP into hwloc NUMA node set \fRnodeset\fP\&. This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter\&. |
| 80 |
|
| 81 |
.PP |
| 82 |
\fBReturns\fP |
| 83 |
.RS 4 |
| 84 |
0 on success\&. |
| 85 |
|
| 86 |
.PP |
| 87 |
-1 with errno set to \fRENOMEM\fP if some internal reallocation failed\&. |
| 88 |
.RE |
| 89 |
.PP |
| 90 |
|
| 91 |
.SS "struct bitmask * hwloc_nodeset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset)\fR [inline]\fP" |
| 92 |
|
| 93 |
.PP |
| 94 |
Convert hwloc NUMA node set \fRnodeset\fP into the returned libnuma bitmask\&. The returned bitmask should later be freed with numa_bitmask_free\&. |
| 95 |
|
| 96 |
.PP |
| 97 |
This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter\&. |
| 98 |
|
| 99 |
.PP |
| 100 |
\fBReturns\fP |
| 101 |
.RS 4 |
| 102 |
newly allocated struct bitmask, or \fRNULL\fP on error\&. |
| 103 |
.RE |
| 104 |
.PP |
| 105 |
|
| 106 |
.SH "Author" |
| 107 |
.PP |
| 108 |
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&. |