File: hwlocality_components_core_funcs.3

package info (click to toggle)
hwloc-contrib 1.11.12-3%2Bdeb10u1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 16,776 kB
  • sloc: ansic: 39,523; xml: 7,505; sh: 5,885; makefile: 1,676; javascript: 87; php: 8; sed: 4
file content (123 lines) | stat: -rw-r--r-- 5,233 bytes parent folder | download | duplicates (2)
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
.TH "hwlocality_components_core_funcs" 3 "Thu Dec 13 2018" "Version 1.11.12" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_components_core_funcs
.SH SYNOPSIS
.br
.PP
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef void(* \fBhwloc_report_error_t\fP) (const char *msg, int line)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "struct \fBhwloc_obj\fP * \fBhwloc_insert_object_by_cpuset\fP (struct hwloc_topology *topology, \fBhwloc_obj_t\fP obj)"
.br
.ti -1c
.RI "void \fBhwloc_report_os_error\fP (const char *msg, int line)"
.br
.ti -1c
.RI "int \fBhwloc_hide_errors\fP (void)"
.br
.ti -1c
.RI "struct \fBhwloc_obj\fP * \fBhwloc__insert_object_by_cpuset\fP (struct hwloc_topology *topology, \fBhwloc_obj_t\fP obj, \fBhwloc_report_error_t\fP report_error)"
.br
.ti -1c
.RI "void \fBhwloc_insert_object_by_parent\fP (struct hwloc_topology *topology, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP obj)"
.br
.ti -1c
.RI "static struct \fBhwloc_obj\fP * \fBhwloc_alloc_setup_object\fP (\fBhwloc_obj_type_t\fP type, signed os_index)"
.br
.ti -1c
.RI "int \fBhwloc_fill_object_sets\fP (\fBhwloc_obj_t\fP obj)"
.br
.ti -1c
.RI "static int \fBhwloc_plugin_check_namespace\fP (const char *pluginname, const char *symbol)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "Typedef Documentation"
.PP 
.SS "typedef void(* hwloc_report_error_t) (const char *msg, int line)"

.PP
Type of error callbacks during object insertion\&. 
.SH "Function Documentation"
.PP 
.SS "struct \fBhwloc_obj\fP* hwloc__insert_object_by_cpuset (struct hwloc_topology * topology, \fBhwloc_obj_t\fP obj, \fBhwloc_report_error_t\fP report_error)"

.PP
Add an object to the topology and specify which error callback to use\&. Aside from the error callback selection, this function is identical to \fBhwloc_insert_object_by_cpuset()\fP 
.SS "static struct \fBhwloc_obj\fP* hwloc_alloc_setup_object (\fBhwloc_obj_type_t\fP type, signed os_index)\fC [static]\fP"

.PP
Allocate and initialize an object of the given type and physical index\&. 
.SS "int hwloc_fill_object_sets (\fBhwloc_obj_t\fP obj)"

.PP
Setup object cpusets/nodesets by OR'ing its children\&. Used when adding an object late in the topology, after propagating sets up and down\&. The caller should use this after inserting by cpuset (which means the cpusets is already OK)\&. Typical case: PCI backend adding a hostbridge parent\&. 
.SS "int hwloc_hide_errors (void)"

.PP
Check whether insertion errors are hidden\&. 
.SS "struct \fBhwloc_obj\fP* hwloc_insert_object_by_cpuset (struct hwloc_topology * topology, \fBhwloc_obj_t\fP obj)"

.PP
Add an object to the topology\&. It is sorted along the tree of other objects according to the inclusion of cpusets, to eventually be added as a child of the smallest object including this object\&.
.PP
If the cpuset is empty, the type of the object (and maybe some attributes) must be enough to find where to insert the object\&. This is especially true for NUMA nodes with memory and no CPUs\&.
.PP
The given object should not have children\&.
.PP
This shall only be called before levels are built\&.
.PP
In case of error, \fBhwloc_report_os_error()\fP is called\&.
.PP
Returns the object on success\&. Returns NULL and frees obj on error\&. Returns another object and frees obj if it was merged with an identical pre-existing object\&. 
.SS "void hwloc_insert_object_by_parent (struct hwloc_topology * topology, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP obj)"

.PP
Insert an object somewhere in the topology\&. It is added as the last child of the given parent\&. The cpuset is completely ignored, so strange objects such as I/O devices should preferably be inserted with this\&.
.PP
When used for 'normal' children with cpusets (when importing from XML when duplicating a topology), the caller should make sure children are inserted in order\&.
.PP
The given object may have children\&.
.PP
Remember to call topology_connect() afterwards to fix handy pointers\&. 
.SS "static int hwloc_plugin_check_namespace (const char * pluginname, const char * symbol)\fC [inline]\fP, \fC [static]\fP"

.PP
Make sure that plugins can lookup core symbols\&. This is a sanity check to avoid lazy-lookup failures when libhwloc is loaded within a plugin, and later tries to load its own plugins\&. This may fail (and abort the program) if libhwloc symbols are in a private namespace\&.
.PP
\fBReturns:\fP
.RS 4
0 on success\&. 
.PP
-1 if the plugin cannot be successfully loaded\&. The caller plugin init() callback should return a negative error code as well\&.
.RE
.PP
Plugins should call this function in their init() callback to avoid later crashes if lazy symbol resolution is used by the upper layer that loaded hwloc (e\&.g\&. OpenCL implementations using dlopen with RTLD_LAZY)\&.
.PP
\fBNote:\fP
.RS 4
The build system must define HWLOC_INSIDE_PLUGIN if and only if building the caller as a plugin\&.
.PP
This function should remain inline so plugins can call it even when they cannot find libhwloc symbols\&. 
.RE
.PP

.SS "void hwloc_report_os_error (const char * msg, int line)"

.PP
Report an insertion error from a backend\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.