Hardware Locality (hwloc): export.h Source File

Hardware Locality (hwloc) 2.14.0rc1

export.h
1/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright © 2009-2018 Inria. All rights reserved.
4 * Copyright © 2009-2012 Université Bordeaux
5 * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
6 * See COPYING in top-level directory.
7 */
8
12
13#ifndef HWLOC_EXPORT_H
14#define HWLOC_EXPORT_H
15
16#ifndef HWLOC_H
17#error Please include the main hwloc.h instead
18#endif
19
20
21#ifdef __cplusplus
22extern "C" {
23#elif 0
24}
25#endif
26
27
31
36 enum hwloc_topology_export_xml_flags_e {
41 HWLOC_TOPOLOGY_EXPORT_XML_FLAG_V1 = (1UL<<0)
42};
43
72HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const char *xmlpath, unsigned long flags);
73
106HWLOC_DECLSPEC int hwloc_topology_export_xmlbuffer(hwloc_topology_t topology, char **xmlbuffer, int *buflen, unsigned long flags);
107
109HWLOC_DECLSPEC void hwloc_free_xmlbuffer(hwloc_topology_t topology, char *xmlbuffer);
110
129HWLOC_DECLSPEC void hwloc_topology_set_userdata_export_callback(hwloc_topology_t topology,
130 void (*export_cb)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj));
131
159HWLOC_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);
160
180HWLOC_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);
181
204HWLOC_DECLSPEC void hwloc_topology_set_userdata_import_callback(hwloc_topology_t topology,
205 void (*import_cb)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length));
206
208
209
213
218 enum hwloc_topology_export_synthetic_flags_e {
224 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES = (1UL<<0),
225
232 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS = (1UL<<1),
233
242 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_V1 = (1UL<<2),
243
252 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY = (1UL<<3)
253};
254
276 HWLOC_DECLSPEC int hwloc_topology_export_synthetic(hwloc_topology_t topology, char *buffer, size_t buflen, unsigned long flags);
277
279
280
281
282#ifdef __cplusplus
283} /* extern "C" */
284#endif
285
286
287#endif /* HWLOC_EXPORT_H */
hwloc_obj_t
struct hwloc_obj * hwloc_obj_t
Convenience typedef; a pointer to a struct hwloc_obj.
Definition hwloc.h:637
hwloc_topology_t
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition hwloc.h:748
hwloc_topology_export_xml_flags_e
hwloc_topology_export_xml_flags_e
Flags for exporting XML topologies.
Definition export.h:36
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_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_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_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_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_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.
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:41
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_synthetic_flags_e
hwloc_topology_export_synthetic_flags_e
Flags for exporting synthetic topologies.
Definition export.h:218
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_IGNORE_MEMORY
Do not export memory information.
Definition export.h:252
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:224
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:242
HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS
@ HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS
Do not export level attributes.
Definition export.h:232