Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v2.9.2

  |   Home   |   Support   |   FAQ   |  
diff.h
1/*
2 * Copyright © 2013-2023 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
19extern "C" {
20#elif 0
21}
22#endif
23
24
68
80
85 /* each part of the union must start with these */
87 } generic;
88
91 /* used for storing integer attributes */
93 hwloc_uint64_t index; /* not used for SIZE */
94 hwloc_uint64_t oldvalue;
95 hwloc_uint64_t newvalue;
97
100 /* used for storing name and info pairs */
102 char *name; /* not used for NAME */
103 char *oldvalue;
104 char *newvalue;
106};
107
108
116
126
131 /* each part of the union must start with these */
133 union hwloc_topology_diff_u * next; /* pointer to the next element of the list, or NULL */
134 } generic;
135
136 /* A difference in an object attribute. */
138 hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
140 /* List of attribute differences for a single object */
142 unsigned obj_index;
144 } obj_attr;
145
146 /* A difference that is too complex. */
148 hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
150 /* Where we had to stop computing the diff in the first topology */
152 unsigned obj_index;
153 } too_complex;
155
156
194HWLOC_DECLSPEC int hwloc_topology_diff_build(hwloc_topology_t topology, hwloc_topology_t newtopology, unsigned long flags, hwloc_topology_diff_t *diff);
195
204
222HWLOC_DECLSPEC int hwloc_topology_diff_apply(hwloc_topology_t topology, hwloc_topology_diff_t diff, unsigned long flags);
223
229
243HWLOC_DECLSPEC int hwloc_topology_diff_load_xml(const char *xmlpath, hwloc_topology_diff_t *diff, char **refname);
244
256HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath);
257
271HWLOC_DECLSPEC int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int buflen, hwloc_topology_diff_t *diff, char **refname);
272
289HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen);
290
294#ifdef __cplusplus
295} /* extern "C" */
296#endif
297
298
299#endif /* HWLOC_DIFF_H */
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:716
union hwloc_topology_diff_u * hwloc_topology_diff_t
One element of a difference list between two topologies.
int hwloc_topology_diff_load_xml(const char *xmlpath, hwloc_topology_diff_t *diff, char **refname)
Load a list of topology differences from a XML file.
hwloc_topology_diff_type_e
Type of one element of a difference list.
Definition: diff.h:111
int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff)
Destroy a list of topology differences.
enum hwloc_topology_diff_obj_attr_type_e hwloc_topology_diff_obj_attr_type_t
Type of one object attribute difference.
enum hwloc_topology_diff_type_e hwloc_topology_diff_type_t
Type of one element of a difference list.
hwloc_topology_diff_obj_attr_type_e
Type of one object attribute difference.
Definition: diff.h:62
int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath)
Export a list of topology differences to a XML file.
int hwloc_topology_diff_build(hwloc_topology_t topology, hwloc_topology_t newtopology, unsigned long flags, hwloc_topology_diff_t *diff)
Compute the difference between 2 topologies.
int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen)
Export a list of topology differences to a XML buffer.
int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int buflen, hwloc_topology_diff_t *diff, char **refname)
Load a list of topology differences from a XML buffer.
hwloc_topology_diff_apply_flags_e
Flags to be given to hwloc_topology_diff_apply().
Definition: diff.h:198
int hwloc_topology_diff_apply(hwloc_topology_t topology, hwloc_topology_diff_t diff, unsigned long flags)
Apply a topology diff to an existing topology.
@ HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
The difference is too complex, it cannot be represented. The difference below this object has not bee...
Definition: diff.h:124
@ HWLOC_TOPOLOGY_DIFF_OBJ_ATTR
An object attribute was changed. The union is a hwloc_topology_diff_u::hwloc_topology_diff_obj_attr_s...
Definition: diff.h:115
@ HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO
the value of an info attribute is modified. The union is a hwloc_topology_diff_obj_attr_u::hwloc_topo...
Definition: diff.h:78
@ HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME
The object name is modified. The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_a...
Definition: diff.h:74
@ HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE
The object local memory is modified. The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_di...
Definition: diff.h:67
@ HWLOC_TOPOLOGY_DIFF_APPLY_REVERSE
Apply topology diff in reverse direction.
Definition: diff.h:202
One object attribute difference.
Definition: diff.h:83
struct hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s string
struct hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_uint64_s uint64
hwloc_topology_diff_obj_attr_type_t type
Definition: diff.h:86
Integer attribute modification with an optional index.
Definition: diff.h:90
hwloc_topology_diff_obj_attr_type_t type
Definition: diff.h:92
String attribute modification with an optional name.
Definition: diff.h:99
hwloc_topology_diff_obj_attr_type_t type
Definition: diff.h:101
One element of a difference list between two topologies.
Definition: diff.h:129
hwloc_topology_diff_type_t type
Definition: diff.h:132
union hwloc_topology_diff_u * next
Definition: diff.h:133
hwloc_topology_diff_type_t type
Definition: diff.h:138
union hwloc_topology_diff_obj_attr_u diff
Definition: diff.h:143
union hwloc_topology_diff_u * next
Definition: diff.h:139
union hwloc_topology_diff_u * next
Definition: diff.h:149
hwloc_topology_diff_type_t type
Definition: diff.h:148