File: hwlocality_components_core_funcs.3

package info (click to toggle)
hwloc-contrib 1.10.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd
  • size: 15,604 kB
  • ctags: 6,628
  • sloc: ansic: 34,014; sh: 12,810; xml: 8,466; makefile: 1,614; sed: 9; php: 8
file content (118 lines) | stat: -rw-r--r-- 5,094 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
.TH "Components and Plugins: Core functions to be used by components" 3 "Tue Oct 7 2014" "Version 1.10.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Components and Plugins: Core functions to be used by components \- 
.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\fPobj, \fBhwloc_report_error_t\fPreport_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\fPtype, signedos_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\fPobj)"

.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\fPobj)"

.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\fPparent, \fBhwloc_obj_t\fPobj)"

.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
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, intline)"

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