Debian Codegraph @

doc/doxygen-doc/man/man3/hwlocality_linux_libnuma_ulongs.3

raw
1 .TH "hwlocality_linux_libnuma_ulongs" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hwlocality_linux_libnuma_ulongs \- Interoperability with Linux libnuma unsigned long masks
6 .SH SYNOPSIS
7 .br
8 .PP
9 .SS "Functions"
10
11 .in +1c
12 .ti -1c
13 .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)"
14 .br
15 .ti -1c
16 .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)"
17 .br
18 .ti -1c
19 .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)"
20 .br
21 .ti -1c
22 .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)"
23 .br
24 .in -1c
25 .SH "Detailed Description"
26 .PP
27 This interface helps converting between Linux libnuma unsigned long masks 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_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long * mask, unsigned long maxnode)\fR [inline]\fP"
42
43 .PP
44 Convert the array of unsigned long \fRmask\fP into hwloc CPU set\&. \fRmask\fP is a array of unsigned long that will be read\&. \fRmaxnode\fP contains the maximal node number that may be read in \fRmask\fP\&.
45
46 .PP
47 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)\&.
48
49 .PP
50 \fBReturns\fP
51 .RS 4
52 0 on success\&.
53
54 .PP
55 -1 on error, for instance if failing an internal reallocation\&.
56 .RE
57 .PP
58
59 .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)\fR [inline]\fP"
60
61 .PP
62 Convert hwloc CPU set \fRcpuset\fP into the array of unsigned long \fRmask\fP\&. \fRmask\fP is the array of unsigned long that will be filled\&. \fRmaxnode\fP contains the maximal node number that may be stored in \fRmask\fP\&. \fRmaxnode\fP will be set to the maximal node number that was found, plus one\&.
63
64 .PP
65 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\&.
66
67 .PP
68 \fBReturns\fP
69 .RS 4
70 0\&.
71 .RE
72 .PP
73 \fBNote\fP
74 .RS 4
75 On heterogeneous memory platforms, we may return multiple local NUMA nodes even if libnuma reports only one (usually the first one)\&.
76 .RE
77 .PP
78
79 .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)\fR [inline]\fP"
80
81 .PP
82 Convert the array of unsigned long \fRmask\fP into hwloc NUMA node set\&. \fRmask\fP is a array of unsigned long that will be read\&. \fRmaxnode\fP contains the maximal node number that may be read in \fRmask\fP\&.
83
84 .PP
85 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)\&.
86
87 .PP
88 \fBReturns\fP
89 .RS 4
90 0 on success\&.
91
92 .PP
93 -1 with errno set to \fRENOMEM\fP if some internal reallocation failed\&.
94 .RE
95 .PP
96
97 .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)\fR [inline]\fP"
98
99 .PP
100 Convert hwloc NUMA node set \fRnodeset\fP into the array of unsigned long \fRmask\fP\&. \fRmask\fP is the array of unsigned long that will be filled\&. \fRmaxnode\fP contains the maximal node number that may be stored in \fRmask\fP\&. \fRmaxnode\fP will be set to the maximal node number that was found, plus one\&.
101
102 .PP
103 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\&.
104
105 .PP
106 \fBReturns\fP
107 .RS 4
108 0\&.
109 .RE
110 .PP
111
112 .SH "Author"
113 .PP
114 Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.