File: hwlocality_linux_libnuma_bitmask.3

package info (click to toggle)
hwloc 2.12.0-4~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 23,576 kB
  • sloc: ansic: 60,875; xml: 13,559; sh: 7,332; makefile: 2,154; javascript: 879; cpp: 93; php: 8; sed: 5
file content (93 lines) | stat: -rw-r--r-- 3,505 bytes parent folder | download | duplicates (4)
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
.TH "hwlocality_linux_libnuma_bitmask" 3 "Version 2.12.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_linux_libnuma_bitmask \- Interoperability with Linux libnuma bitmask
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "struct bitmask * \fBhwloc_cpuset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)"
.br
.ti -1c
.RI "struct bitmask * \fBhwloc_nodeset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset)"
.br
.ti -1c
.RI "int \fBhwloc_cpuset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask *bitmask)"
.br
.ti -1c
.RI "int \fBhwloc_nodeset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const struct bitmask *bitmask)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This interface helps converting between Linux libnuma bitmasks 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_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask * bitmask)\fC [inline]\fP"

.PP
Convert libnuma bitmask \fCbitmask\fP into hwloc CPU set \fCcpuset\fP\&. This function may be used after calling many numa_ functions that use a struct bitmask as an output 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 "struct bitmask * hwloc_cpuset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)\fC [inline]\fP"

.PP
Convert hwloc CPU set \fCcpuset\fP into the returned libnuma bitmask\&. The returned bitmask should later be freed with numa_bitmask_free\&.
.PP
This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter\&.
.PP
\fBReturns\fP
.RS 4
newly allocated struct bitmask, or \fCNULL\fP on error\&. 
.RE
.PP

.SS "int hwloc_nodeset_from_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_nodeset_t\fP nodeset, const struct bitmask * bitmask)\fC [inline]\fP"

.PP
Convert libnuma bitmask \fCbitmask\fP into hwloc NUMA node set \fCnodeset\fP\&. This function may be used after calling many numa_ functions that use a struct bitmask as an output 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 "struct bitmask * hwloc_nodeset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_nodeset_t\fP nodeset)\fC [inline]\fP"

.PP
Convert hwloc NUMA node set \fCnodeset\fP into the returned libnuma bitmask\&. The returned bitmask should later be freed with numa_bitmask_free\&.
.PP
This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter\&.
.PP
\fBReturns\fP
.RS 4
newly allocated struct bitmask, or \fCNULL\fP on error\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.