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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
.TH "hwlocality_creation" 3 "Thu Feb 11 2021" "Version 2.4.1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_creation \- Topology Creation and Destruction
.SH SYNOPSIS
.br
.PP
.SS "Typedefs"
.in +1c
.ti -1c
.RI "typedef struct hwloc_topology * \fBhwloc_topology_t\fP"
.br
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "int \fBhwloc_topology_init\fP (\fBhwloc_topology_t\fP *topologyp)"
.br
.ti -1c
.RI "int \fBhwloc_topology_load\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "void \fBhwloc_topology_destroy\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "int \fBhwloc_topology_dup\fP (\fBhwloc_topology_t\fP *newtopology, \fBhwloc_topology_t\fP oldtopology)"
.br
.ti -1c
.RI "int \fBhwloc_topology_abi_check\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "void \fBhwloc_topology_check\fP (\fBhwloc_topology_t\fP topology)"
.br
.in -1c
.SH "Detailed Description"
.PP
.SH "Typedef Documentation"
.PP
.SS "typedef struct hwloc_topology* \fBhwloc_topology_t\fP"
.PP
Topology context\&. To be initialized with \fBhwloc_topology_init()\fP and built with \fBhwloc_topology_load()\fP\&.
.SH "Function Documentation"
.PP
.SS "int hwloc_topology_abi_check (\fBhwloc_topology_t\fP topology)"
.PP
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)\&.
.PP
If all libraries/programs use the same hwloc installation, this function always returns success\&.
.PP
\fBReturns\fP
.RS 4
\fC0\fP on success\&.
.PP
\fC-1\fP with \fCerrno\fP set to \fCEINVAL\fP if incompatible\&.
.RE
.PP
\fBNote\fP
.RS 4
If sharing between processes with \fBhwloc_shmem_topology_write()\fP, the relevant check is already performed inside \fBhwloc_shmem_topology_adopt()\fP\&.
.RE
.PP
.SS "void hwloc_topology_check (\fBhwloc_topology_t\fP topology)"
.PP
Run internal checks on a topology structure\&. The program aborts if an inconsistency is detected in the given topology\&.
.PP
\fBParameters\fP
.RS 4
\fItopology\fP is the topology to be checked
.RE
.PP
\fBNote\fP
.RS 4
This routine is only useful to developers\&.
.PP
The input topology should have been previously loaded with \fBhwloc_topology_load()\fP\&.
.RE
.PP
.SS "void hwloc_topology_destroy (\fBhwloc_topology_t\fP topology)"
.PP
Terminate and free a topology context\&.
.PP
\fBParameters\fP
.RS 4
\fItopology\fP is the topology to be freed
.RE
.PP
.SS "int hwloc_topology_dup (\fBhwloc_topology_t\fP * newtopology, \fBhwloc_topology_t\fP oldtopology)"
.PP
Duplicate a topology\&. The entire topology structure as well as its objects are duplicated into a new one\&.
.PP
This is useful for keeping a backup while modifying a topology\&.
.PP
\fBNote\fP
.RS 4
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\&.
.RE
.PP
.SS "int hwloc_topology_init (\fBhwloc_topology_t\fP * topologyp)"
.PP
Allocate a topology context\&.
.PP
\fBParameters\fP
.RS 4
\fItopologyp\fP is assigned a pointer to the new allocated context\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
.SS "int hwloc_topology_load (\fBhwloc_topology_t\fP topology)"
.PP
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\&.
.PP
\fBParameters\fP
.RS 4
\fItopology\fP is the topology to be loaded with objects\&.
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, -1 on error\&.
.RE
.PP
\fBNote\fP
.RS 4
On failure, the topology is reinitialized\&. It should be either destroyed with \fBhwloc_topology_destroy()\fP or configured and loaded again\&.
.PP
This function may be called only once per topology\&.
.PP
The binding of the current thread or process may temporarily change during this call but it will be restored before it returns\&.
.RE
.PP
\fBSee also\fP
.RS 4
\fBTopology Detection Configuration and Query\fP and \fBChanging the Source of Topology Discovery\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.
|