Hardware Locality (hwloc) 2.2.0

export.h
1 /*
2 * Copyright © 2009-2018 Inria. All rights reserved.
3 * Copyright © 2009-2012 Université Bordeaux
4 * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
5 * See COPYING in top-level directory.
6 */
7
12 #ifndef HWLOC_EXPORT_H
13 #define HWLOC_EXPORT_H
14
15 #ifndef HWLOC_H
16 #error Please include the main hwloc.h instead
17 #endif
18
19
20 #ifdef __cplusplus
21 extern "C" {
22 #elif 0
23 }
24 #endif
25
26
35 enum hwloc_topology_export_xml_flags_e {
40 HWLOC_TOPOLOGY_EXPORT_XML_FLAG_V1 = (1UL<<0)
41 };
42
71 HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const char *xmlpath, unsigned long flags);
72
105 HWLOC_DECLSPEC int hwloc_topology_export_xmlbuffer(hwloc_topology_t topology, char **xmlbuffer, int *buflen, unsigned long flags);
106
108 HWLOC_DECLSPEC void hwloc_free_xmlbuffer(hwloc_topology_t topology, char *xmlbuffer);
109
128 HWLOC_DECLSPEC void hwloc_topology_set_userdata_export_callback(hwloc_topology_t topology,
129 void (*export_cb)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj));
130
156 HWLOC_DECLSPEC int hwloc_export_obj_userdata(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
157
171 HWLOC_DECLSPEC int hwloc_export_obj_userdata_base64(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length);
172
195 HWLOC_DECLSPEC void hwloc_topology_set_userdata_import_callback(hwloc_topology_t topology,
196 void (*import_cb)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length));
197
209 enum hwloc_topology_export_synthetic_flags_e {
215 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES = (1UL<<0),
216
223 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS = (1UL<<1),
224
233 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_V1 = (1UL<<2),
234
243 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY = (1UL<<3)
244 };
245
267 HWLOC_DECLSPEC int hwloc_topology_export_synthetic(hwloc_topology_t topology, char *buffer, size_t buflen, unsigned long flags);
268
273 #ifdef __cplusplus
274 } /* extern "C" */
275 #endif
276
277
278 #endif /* HWLOC_EXPORT_H */
hwloc_topology_set_userdata_import_callback
void hwloc_topology_set_userdata_import_callback(hwloc_topology_t topology, void(*import_cb)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length))
Set the application-specific callback for importing userdata.
HWLOC_TOPOLOGY_EXPORT_XML_FLAG_V1
@ HWLOC_TOPOLOGY_EXPORT_XML_FLAG_V1
Export XML that is loadable by hwloc v1.x. However, the export may miss some details about the topolo...
Definition: export.h:40
hwloc_topology_export_synthetic_flags_e
hwloc_topology_export_synthetic_flags_e
Flags for exporting synthetic topologies.
Definition: export.h:209
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_V1
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_V1
Export the memory hierarchy as expected in hwloc 1.x.
Definition: export.h:233
hwloc_topology_t
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:678
hwloc_export_obj_userdata_base64
int hwloc_export_obj_userdata_base64(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length)
Encode and export some object userdata to XML.
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY
Do not export memory information.
Definition: export.h:243
hwloc_obj
Structure of a topology object.
Definition: hwloc.h:384
hwloc_topology_export_xml_flags_e
hwloc_topology_export_xml_flags_e
Flags for exporting XML topologies.
Definition: export.h:35
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES
Export extended types such as L2dcache as basic types such as Cache.
Definition: export.h:215
hwloc_free_xmlbuffer
void hwloc_free_xmlbuffer(hwloc_topology_t topology, char *xmlbuffer)
Free a buffer allocated by hwloc_topology_export_xmlbuffer()
hwloc_topology_export_xml
int hwloc_topology_export_xml(hwloc_topology_t topology, const char *xmlpath, unsigned long flags)
Export the topology into an XML file.
hwloc_export_obj_userdata
int hwloc_export_obj_userdata(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length)
Export some object userdata to XML.
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS
Do not export level attributes.
Definition: export.h:223
hwloc_topology_set_userdata_export_callback
void hwloc_topology_set_userdata_export_callback(hwloc_topology_t topology, void(*export_cb)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj))
Set the application-specific callback for exporting object userdata.
hwloc_topology_export_synthetic
int hwloc_topology_export_synthetic(hwloc_topology_t topology, char *buffer, size_t buflen, unsigned long flags)
Export the topology as a synthetic string.
hwloc_topology_export_xmlbuffer
int hwloc_topology_export_xmlbuffer(hwloc_topology_t topology, char **xmlbuffer, int *buflen, unsigned long flags)
Export the topology into a newly-allocated XML memory buffer.