Hardware Locality (hwloc)
1.11.12
Main Page
Related Pages
Modules
Data Structures
include
hwloc
diff.h
1
/*
2
* Copyright © 2013-2018 Inria. All rights reserved.
3
* See COPYING in top-level directory.
4
*/
5
10
#ifndef HWLOC_DIFF_H
11
#define HWLOC_DIFF_H
12
13
#ifndef HWLOC_H
14
#error Please include the main hwloc.h instead
15
#endif
16
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#elif 0
21
}
22
#endif
23
24
61
typedef
enum
hwloc_topology_diff_obj_attr_type_e
{
66
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE
,
67
73
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME
,
77
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO
78
}
hwloc_topology_diff_obj_attr_type_t
;
79
82
union
hwloc_topology_diff_obj_attr_u
{
83
struct
hwloc_topology_diff_obj_attr_generic_s
{
84
/* each part of the union must start with these */
85
hwloc_topology_diff_obj_attr_type_t
type
;
86
}
generic
;
87
89
struct
hwloc_topology_diff_obj_attr_uint64_s
{
90
/* used for storing integer attributes */
91
hwloc_topology_diff_obj_attr_type_t
type
;
92
hwloc_uint64_t
index
;
/* not used for SIZE */
93
hwloc_uint64_t
oldvalue
;
94
hwloc_uint64_t
newvalue
;
95
}
uint64
;
96
98
struct
hwloc_topology_diff_obj_attr_string_s
{
99
/* used for storing name and info pairs */
100
hwloc_topology_diff_obj_attr_type_t
type
;
101
char
*
name
;
/* not used for NAME */
102
char
*
oldvalue
;
103
char
*
newvalue
;
104
}
string
;
105
};
106
107
110
typedef
enum
hwloc_topology_diff_type_e
{
114
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR
,
115
123
HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
124
}
hwloc_topology_diff_type_t
;
125
128
typedef
union
hwloc_topology_diff_u
{
129
struct
hwloc_topology_diff_generic_s
{
130
/* each part of the union must start with these */
131
hwloc_topology_diff_type_t
type
;
132
union
hwloc_topology_diff_u
*
next
;
/* pointer to the next element of the list, or NULL */
133
}
generic
;
134
135
/* A difference in an object attribute. */
136
struct
hwloc_topology_diff_obj_attr_s
{
137
hwloc_topology_diff_type_t
type
;
/* must be ::HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
138
union
hwloc_topology_diff_u
*
next
;
139
/* List of attribute differences for a single object */
140
unsigned
obj_depth
;
141
unsigned
obj_index
;
142
union
hwloc_topology_diff_obj_attr_u
diff
;
143
} obj_attr;
144
145
/* A difference that is too complex. */
146
struct
hwloc_topology_diff_too_complex_s
{
147
hwloc_topology_diff_type_t
type
;
/* must be ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
148
union
hwloc_topology_diff_u
*
next
;
149
/* Where we had to stop computing the diff in the first topology */
150
unsigned
obj_depth
;
151
unsigned
obj_index
;
152
} too_complex;
153
} *
hwloc_topology_diff_t
;
154
155
193
HWLOC_DECLSPEC
int
hwloc_topology_diff_build
(
hwloc_topology_t
topology,
hwloc_topology_t
newtopology,
unsigned
long
flags,
hwloc_topology_diff_t
*diff);
194
197
enum
hwloc_topology_diff_apply_flags_e
{
201
HWLOC_TOPOLOGY_DIFF_APPLY_REVERSE
= (1UL<<0)
202
};
203
221
HWLOC_DECLSPEC
int
hwloc_topology_diff_apply
(
hwloc_topology_t
topology,
hwloc_topology_diff_t
diff,
unsigned
long
flags);
222
228
HWLOC_DECLSPEC
int
hwloc_topology_diff_destroy
(
hwloc_topology_t
topology,
hwloc_topology_diff_t
diff);
229
244
HWLOC_DECLSPEC
int
hwloc_topology_diff_load_xml
(
hwloc_topology_t
topology,
const
char
*xmlpath,
hwloc_topology_diff_t
*diff,
char
**refname);
245
258
HWLOC_DECLSPEC
int
hwloc_topology_diff_export_xml
(
hwloc_topology_t
topology,
hwloc_topology_diff_t
diff,
const
char
*refname,
const
char
*xmlpath);
259
274
HWLOC_DECLSPEC
int
hwloc_topology_diff_load_xmlbuffer
(
hwloc_topology_t
topology,
const
char
*xmlbuffer,
int
buflen,
hwloc_topology_diff_t
*diff,
char
**refname);
275
293
HWLOC_DECLSPEC
int
hwloc_topology_diff_export_xmlbuffer
(
hwloc_topology_t
topology,
hwloc_topology_diff_t
diff,
const
char
*refname,
char
**xmlbuffer,
int
*buflen);
294
298
#ifdef __cplusplus
299
}
/* extern "C" */
300
#endif
301
302
303
#endif
/* HWLOC_DIFF_H */
Generated on Mon Jun 27 2022 00:22:15 for Hardware Locality (hwloc) by
1.8.1.2