Debian Codegraph @

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

raw
1 .TH "hwlocality_creation" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hwlocality_creation \- Topology Creation and Destruction
6 .SH SYNOPSIS
7 .br
8 .PP
9 .SS "Typedefs"
10
11 .in +1c
12 .ti -1c
13 .RI "typedef struct hwloc_topology * \fBhwloc_topology_t\fP"
14 .br
15 .in -1c
16 .SS "Functions"
17
18 .in +1c
19 .ti -1c
20 .RI "int \fBhwloc_topology_init\fP (\fBhwloc_topology_t\fP *topologyp)"
21 .br
22 .ti -1c
23 .RI "int \fBhwloc_topology_load\fP (\fBhwloc_topology_t\fP topology)"
24 .br
25 .ti -1c
26 .RI "void \fBhwloc_topology_destroy\fP (\fBhwloc_topology_t\fP topology)"
27 .br
28 .ti -1c
29 .RI "int \fBhwloc_topology_dup\fP (\fBhwloc_topology_t\fP *newtopology, \fBhwloc_topology_t\fP oldtopology)"
30 .br
31 .ti -1c
32 .RI "int \fBhwloc_topology_abi_check\fP (\fBhwloc_topology_t\fP topology)"
33 .br
34 .ti -1c
35 .RI "void \fBhwloc_topology_check\fP (\fBhwloc_topology_t\fP topology)"
36 .br
37 .in -1c
38 .SH "Detailed Description"
39 .PP
40
41 .SH "Typedef Documentation"
42 .PP
43 .SS "typedef struct hwloc_topology* \fBhwloc_topology_t\fP"
44
45 .PP
46 Topology context\&. To be initialized with \fBhwloc_topology_init()\fP and built with \fBhwloc_topology_load()\fP\&.
47 .SH "Function Documentation"
48 .PP
49 .SS "int hwloc_topology_abi_check (\fBhwloc_topology_t\fP topology)"
50
51 .PP
52 Verify that the topology is compatible with the current hwloc library\&. This is useful when using the same topology structure (in memory) in different libraries that may use different hwloc installations (for instance if one library embeds a specific version of hwloc, while another library uses a default system-wide hwloc installation)\&.
53
54 .PP
55 If all libraries/programs use the same hwloc installation, this function always returns success\&.
56
57 .PP
58 \fBReturns\fP
59 .RS 4
60 \fR0\fP on success\&.
61
62 .PP
63 \fR-1\fP with \fRerrno\fP set to \fREINVAL\fP if incompatible\&.
64 .RE
65 .PP
66 \fBNote\fP
67 .RS 4
68 If sharing between processes with \fBhwloc_shmem_topology_write()\fP, the relevant check is already performed inside \fBhwloc_shmem_topology_adopt()\fP\&.
69 .RE
70 .PP
71
72 .SS "void hwloc_topology_check (\fBhwloc_topology_t\fP topology)"
73
74 .PP
75 Run internal checks on a topology structure\&. The program aborts if an inconsistency is detected in the given topology\&.
76
77 .PP
78 \fBParameters\fP
79 .RS 4
80 \fItopology\fP is the topology to be checked
81 .RE
82 .PP
83 \fBNote\fP
84 .RS 4
85 This routine is only useful to developers\&.
86
87 .PP
88 The input topology should have been previously loaded with \fBhwloc_topology_load()\fP\&.
89 .RE
90 .PP
91
92 .SS "void hwloc_topology_destroy (\fBhwloc_topology_t\fP topology)"
93
94 .PP
95 Terminate and free a topology context\&.
96 .PP
97 \fBParameters\fP
98 .RS 4
99 \fItopology\fP is the topology to be freed
100 .RE
101 .PP
102
103 .SS "int hwloc_topology_dup (\fBhwloc_topology_t\fP * newtopology, \fBhwloc_topology_t\fP oldtopology)"
104
105 .PP
106 Duplicate a topology\&. The entire topology structure as well as its objects are duplicated into a new one\&.
107
108 .PP
109 This is useful for keeping a backup while modifying a topology\&.
110
111 .PP
112 \fBReturns\fP
113 .RS 4
114 0 on success, -1 on error\&.
115 .RE
116 .PP
117 \fBNote\fP
118 .RS 4
119 Object userdata is not duplicated since hwloc does not know what it point to\&. The objects of both old and new topologies will point to the same userdata\&.
120 .RE
121 .PP
122
123 .SS "int hwloc_topology_init (\fBhwloc_topology_t\fP * topologyp)"
124
125 .PP
126 Allocate a topology context\&.
127 .PP
128 \fBParameters\fP
129 .RS 4
130 \fItopologyp\fP is assigned a pointer to the new allocated context\&.
131 .RE
132 .PP
133 \fBReturns\fP
134 .RS 4
135 0 on success, -1 on error\&.
136 .RE
137 .PP
138
139 .SS "int hwloc_topology_load (\fBhwloc_topology_t\fP topology)"
140
141 .PP
142 Build the actual topology\&. Build the actual topology once initialized with \fBhwloc_topology_init()\fP and tuned with \fBTopology Detection Configuration and Query\fP and \fBChanging the Source of Topology Discovery\fP routines\&. No other routine may be called earlier using this topology context\&.
143
144 .PP
145 \fBParameters\fP
146 .RS 4
147 \fItopology\fP is the topology to be loaded with objects\&.
148 .RE
149 .PP
150 \fBReturns\fP
151 .RS 4
152 0 on success, -1 on error\&.
153 .RE
154 .PP
155 \fBNote\fP
156 .RS 4
157 On failure, the topology is reinitialized\&. It should be either destroyed with \fBhwloc_topology_destroy()\fP or configured and loaded again\&.
158
159 .PP
160 This function may be called only once per topology\&.
161
162 .PP
163 The binding of the current thread or process may temporarily change during this call but it will be restored before it returns\&.
164 .RE
165 .PP
166 \fBSee also\fP
167 .RS 4
168 \fBTopology Detection Configuration and Query\fP and \fBChanging the Source of Topology Discovery\fP
169 .RE
170 .PP
171
172 .SH "Author"
173 .PP
174 Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.