File: hwlocality_object_strings.3

package info (click to toggle)
hwloc 1.11.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,800 kB
  • ctags: 4,878
  • sloc: ansic: 38,012; xml: 7,505; sh: 5,669; makefile: 1,658; php: 8; sed: 4
file content (103 lines) | stat: -rw-r--r-- 4,723 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
.TH "hwlocality_object_strings" 3 "Thu Nov 10 2016" "Version 1.11.5" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
hwlocality_object_strings \- Converting between Object Types, Sets and Attributes, and Strings
.SS "Functions"

.in +1c
.ti -1c
.RI "const char * \fBhwloc_obj_type_string\fP (\fBhwloc_obj_type_t\fP type)"
.br
.ti -1c
.RI "int \fBhwloc_obj_type_snprintf\fP (char *restrict string, size_t size, \fBhwloc_obj_t\fP obj, int verbose)"
.br
.ti -1c
.RI "int \fBhwloc_obj_attr_snprintf\fP (char *restrict string, size_t size, \fBhwloc_obj_t\fP obj, const char *restrict separator, int verbose)"
.br
.ti -1c
.RI "int \fBhwloc_obj_cpuset_snprintf\fP (char *restrict str, size_t size, size_t nobj, const \fBhwloc_obj_t\fP *restrict objs)"
.br
.ti -1c
.RI "int \fBhwloc_obj_type_sscanf\fP (const char *string, \fBhwloc_obj_type_t\fP *typep, int *depthattrp, void *typeattrp, size_t typeattrsize)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "Function Documentation"
.PP 
.SS "int hwloc_obj_attr_snprintf (char *restrict string, size_t size, \fBhwloc_obj_t\fP obj, const char *restrict separator, int verbose)"

.PP
Stringify the attributes of a given topology object into a human-readable form\&. Attribute values are separated by \fCseparator\fP\&.
.PP
Only the major attributes are printed in non-verbose mode\&.
.PP
If \fCsize\fP is 0, \fCstring\fP may safely be \fCNULL\fP\&.
.PP
\fBReturns:\fP
.RS 4
the number of character that were actually written if not truncating, or that would have been written (not including the ending \\0)\&. 
.RE
.PP

.SS "int hwloc_obj_cpuset_snprintf (char *restrict str, size_t size, size_t nobj, const \fBhwloc_obj_t\fP *restrict objs)"

.PP
Stringify the cpuset containing a set of objects\&. If \fCsize\fP is 0, \fCstring\fP may safely be \fCNULL\fP\&.
.PP
\fBReturns:\fP
.RS 4
the number of character that were actually written if not truncating, or that would have been written (not including the ending \\0)\&. 
.RE
.PP

.SS "int hwloc_obj_type_snprintf (char *restrict string, size_t size, \fBhwloc_obj_t\fP obj, int verbose)"

.PP
Stringify the type of a given topology object into a human-readable form\&. Contrary to \fBhwloc_obj_type_string()\fP, this function includes object-specific attributes (such as the Group depth, the Bridge type, or OS device type) in the output, and it requires the caller to provide the output buffer\&.
.PP
The output is guaranteed to be the same for all objects of a same topology level\&.
.PP
If \fCsize\fP is 0, \fCstring\fP may safely be \fCNULL\fP\&.
.PP
\fBReturns:\fP
.RS 4
the number of character that were actually written if not truncating, or that would have been written (not including the ending \\0)\&. 
.RE
.PP

.SS "int hwloc_obj_type_sscanf (const char * string, \fBhwloc_obj_type_t\fP * typep, int * depthattrp, void * typeattrp, size_t typeattrsize)"

.PP
Return an object type and attributes from a type string\&. Convert strings such as 'Package' or 'Cache' into the corresponding types\&. Matching is case-insensitive, and only the first letters are actually required to match\&.
.PP
This function is guaranteed to match any string returned by \fBhwloc_obj_type_string()\fP or \fBhwloc_obj_type_snprintf()\fP\&.
.PP
Types that have specific attributes, for instance caches and groups, may be returned in \fCdepthattrp\fP and \fCtypeattrp\fP\&. They are ignored when these pointers are \fCNULL\fP\&.
.PP
For instance 'L2i' or 'L2iCache' would return type HWLOC_OBJ_CACHE in \fCtypep\fP, 2 in \fCdepthattrp\fP, and HWLOC_OBJ_CACHE_TYPE_INSTRUCTION in \fCtypeattrp\fP (this last pointer should point to a hwloc_obj_cache_type_t)\&. 'Group3' would return type HWLOC_OBJ_GROUP type and 3 in \fCdepthattrp\fP\&. Attributes that are not specified in the string (for instance 'Group' without a depth, or 'L2Cache' without a cache type) are set to -1\&.
.PP
\fCtypeattrp\fP is only filled if the size specified in \fCtypeattrsize\fP is large enough\&. It is currently only used for caches, and the required size is at least the size of hwloc_obj_cache_type_t\&.
.PP
\fBReturns:\fP
.RS 4
0 if a type was correctly identified, otherwise -1\&.
.RE
.PP
\fBNote:\fP
.RS 4
This is an extended version of the now deprecated hwloc_obj_type_of_string() 
.RE
.PP

.SS "const char* hwloc_obj_type_string (\fBhwloc_obj_type_t\fP type)"

.PP
Return a constant stringified object type\&. This function is the basic way to convert a generic type into a string\&.
.PP
\fBhwloc_obj_type_snprintf()\fP may return a more precise output for a specific object, but it requires the caller to provide the output buffer\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.