00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00050 #ifndef HWLOC_H
00051 #define HWLOC_H
00052
00053 #include <hwloc/autogen/config.h>
00054 #include <sys/types.h>
00055 #include <stdio.h>
00056 #include <string.h>
00057 #include <limits.h>
00058
00059
00060
00061
00062 #include <hwloc/rename.h>
00063
00064
00065
00066
00067
00068 #include <hwloc/bitmap.h>
00069
00070
00071 #ifdef __cplusplus
00072 extern "C" {
00073 #endif
00074
00075
00088 #define HWLOC_API_VERSION 0x00010b06
00089
00094 HWLOC_DECLSPEC unsigned hwloc_get_api_version(void);
00095
00097 #define HWLOC_COMPONENT_ABI 4
00098
00132 typedef hwloc_bitmap_t hwloc_cpuset_t;
00134 typedef hwloc_const_bitmap_t hwloc_const_cpuset_t;
00135
00151 typedef hwloc_bitmap_t hwloc_nodeset_t;
00154 typedef hwloc_const_bitmap_t hwloc_const_nodeset_t;
00155
00170 typedef enum {
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180 HWLOC_OBJ_SYSTEM,
00185 HWLOC_OBJ_MACHINE,
00190 HWLOC_OBJ_NUMANODE,
00199 HWLOC_OBJ_PACKAGE,
00204 HWLOC_OBJ_CACHE,
00207 HWLOC_OBJ_CORE,
00211 HWLOC_OBJ_PU,
00220 HWLOC_OBJ_GROUP,
00233 HWLOC_OBJ_MISC,
00239 HWLOC_OBJ_BRIDGE,
00246 HWLOC_OBJ_PCI_DEVICE,
00251 HWLOC_OBJ_OS_DEVICE,
00257 HWLOC_OBJ_TYPE_MAX
00259
00260
00261
00262
00263
00264
00265
00266
00267 } hwloc_obj_type_t;
00268
00270 typedef enum hwloc_obj_cache_type_e {
00271 HWLOC_OBJ_CACHE_UNIFIED,
00272 HWLOC_OBJ_CACHE_DATA,
00273 HWLOC_OBJ_CACHE_INSTRUCTION
00275 } hwloc_obj_cache_type_t;
00276
00278 typedef enum hwloc_obj_bridge_type_e {
00279 HWLOC_OBJ_BRIDGE_HOST,
00280 HWLOC_OBJ_BRIDGE_PCI
00281 } hwloc_obj_bridge_type_t;
00282
00284 typedef enum hwloc_obj_osdev_type_e {
00285 HWLOC_OBJ_OSDEV_BLOCK,
00287 HWLOC_OBJ_OSDEV_GPU,
00290 HWLOC_OBJ_OSDEV_NETWORK,
00292 HWLOC_OBJ_OSDEV_OPENFABRICS,
00295 HWLOC_OBJ_OSDEV_DMA,
00297 HWLOC_OBJ_OSDEV_COPROC
00301 } hwloc_obj_osdev_type_t;
00302
00320 HWLOC_DECLSPEC int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const;
00321
00322 enum hwloc_compare_types_e {
00323 HWLOC_TYPE_UNORDERED = INT_MAX
00324 };
00325
00334 union hwloc_obj_attr_u;
00335
00337 struct hwloc_obj_memory_s {
00338 hwloc_uint64_t total_memory;
00339 hwloc_uint64_t local_memory;
00342 unsigned page_types_len;
00348 struct hwloc_obj_memory_page_type_s {
00349 hwloc_uint64_t size;
00350 hwloc_uint64_t count;
00351 } * page_types;
00352 };
00353
00358 struct hwloc_obj {
00359
00360 hwloc_obj_type_t type;
00362 unsigned os_index;
00366 char *name;
00371 struct hwloc_obj_memory_s memory;
00373 union hwloc_obj_attr_u *attr;
00376
00377 unsigned depth;
00392 unsigned logical_index;
00396 signed os_level;
00398
00399 struct hwloc_obj *next_cousin;
00400 struct hwloc_obj *prev_cousin;
00402
00403 struct hwloc_obj *parent;
00404 unsigned sibling_rank;
00405 struct hwloc_obj *next_sibling;
00406 struct hwloc_obj *prev_sibling;
00408
00409 unsigned arity;
00410 struct hwloc_obj **children;
00411 struct hwloc_obj *first_child;
00412 struct hwloc_obj *last_child;
00414
00415 void *userdata;
00420
00421 hwloc_cpuset_t cpuset;
00434 hwloc_cpuset_t complete_cpuset;
00445 hwloc_cpuset_t online_cpuset;
00453 hwloc_cpuset_t allowed_cpuset;
00464 hwloc_nodeset_t nodeset;
00481 hwloc_nodeset_t complete_nodeset;
00495 hwloc_nodeset_t allowed_nodeset;
00508 struct hwloc_distances_s **distances;
00509 unsigned distances_count;
00510
00511 struct hwloc_obj_info_s *infos;
00512 unsigned infos_count;
00514 int symmetric_subtree;
00519 };
00523 typedef struct hwloc_obj * hwloc_obj_t;
00524
00526 union hwloc_obj_attr_u {
00528 struct hwloc_cache_attr_s {
00529 hwloc_uint64_t size;
00530 unsigned depth;
00531 unsigned linesize;
00532 int associativity;
00534 hwloc_obj_cache_type_t type;
00535 } cache;
00537 struct hwloc_group_attr_s {
00538 unsigned depth;
00539 unsigned char dont_merge;
00540 } group;
00542 struct hwloc_pcidev_attr_s {
00543 unsigned short domain;
00544 unsigned char bus, dev, func;
00545 unsigned short class_id;
00546 unsigned short vendor_id, device_id, subvendor_id, subdevice_id;
00547 unsigned char revision;
00548 float linkspeed;
00549 } pcidev;
00551 struct hwloc_bridge_attr_s {
00552 union {
00553 struct hwloc_pcidev_attr_s pci;
00554 } upstream;
00555 hwloc_obj_bridge_type_t upstream_type;
00556 union {
00557 struct {
00558 unsigned short domain;
00559 unsigned char secondary_bus, subordinate_bus;
00560 } pci;
00561 } downstream;
00562 hwloc_obj_bridge_type_t downstream_type;
00563 unsigned depth;
00564 } bridge;
00566 struct hwloc_osdev_attr_s {
00567 hwloc_obj_osdev_type_t type;
00568 } osdev;
00569 };
00570
00584 struct hwloc_distances_s {
00585 unsigned relative_depth;
00587 unsigned nbobjs;
00592 float *latency;
00604 float latency_max;
00605 float latency_base;
00609 };
00610
00615 struct hwloc_obj_info_s {
00616 char *name;
00617 char *value;
00618 };
00619
00628 struct hwloc_topology;
00633 typedef struct hwloc_topology * hwloc_topology_t;
00634
00641 HWLOC_DECLSPEC int hwloc_topology_init (hwloc_topology_t *topologyp);
00642
00663 HWLOC_DECLSPEC int hwloc_topology_load(hwloc_topology_t topology);
00664
00669 HWLOC_DECLSPEC void hwloc_topology_destroy (hwloc_topology_t topology);
00670
00681 HWLOC_DECLSPEC int hwloc_topology_dup(hwloc_topology_t *newtopology, hwloc_topology_t oldtopology);
00682
00694 HWLOC_DECLSPEC void hwloc_topology_check(hwloc_topology_t topology);
00695
00732 HWLOC_DECLSPEC int hwloc_topology_ignore_type(hwloc_topology_t topology, hwloc_obj_type_t type);
00733
00742 HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure(hwloc_topology_t topology, hwloc_obj_type_t type);
00743
00750 HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure(hwloc_topology_t topology);
00751
00757 enum hwloc_topology_flags_e {
00773 HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1UL<<0),
00774
00793 HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM = (1UL<<1),
00794
00806 HWLOC_TOPOLOGY_FLAG_IO_DEVICES = (1UL<<2),
00807
00815 HWLOC_TOPOLOGY_FLAG_IO_BRIDGES = (1UL<<3),
00816
00825 HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1UL<<4),
00826
00833 HWLOC_TOPOLOGY_FLAG_ICACHES = (1UL<<5),
00834
00854 HWLOC_TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES = (1UL<<6)
00855 };
00856
00866 HWLOC_DECLSPEC int hwloc_topology_set_flags (hwloc_topology_t topology, unsigned long flags);
00867
00874 HWLOC_DECLSPEC unsigned long hwloc_topology_get_flags (hwloc_topology_t topology);
00875
00890 HWLOC_DECLSPEC int hwloc_topology_set_pid(hwloc_topology_t __hwloc_restrict topology, hwloc_pid_t pid);
00891
00918 HWLOC_DECLSPEC int hwloc_topology_set_fsroot(hwloc_topology_t __hwloc_restrict topology, const char * __hwloc_restrict fsroot_path);
00919
00947 HWLOC_DECLSPEC int hwloc_topology_set_synthetic(hwloc_topology_t __hwloc_restrict topology, const char * __hwloc_restrict description);
00948
00975 HWLOC_DECLSPEC int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topology, const char * __hwloc_restrict xmlpath);
00976
01003 HWLOC_DECLSPEC int hwloc_topology_set_xmlbuffer(hwloc_topology_t __hwloc_restrict topology, const char * __hwloc_restrict buffer, int size);
01004
01024 HWLOC_DECLSPEC int hwloc_topology_set_custom(hwloc_topology_t topology);
01025
01044 HWLOC_DECLSPEC int hwloc_topology_set_distance_matrix(hwloc_topology_t __hwloc_restrict topology,
01045 hwloc_obj_type_t type, unsigned nbobjs,
01046 unsigned *os_index, float *distances);
01047
01055 HWLOC_DECLSPEC int hwloc_topology_is_thissystem(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
01056
01058 struct hwloc_topology_discovery_support {
01060 unsigned char pu;
01061 };
01062
01068 struct hwloc_topology_cpubind_support {
01070 unsigned char set_thisproc_cpubind;
01072 unsigned char get_thisproc_cpubind;
01074 unsigned char set_proc_cpubind;
01076 unsigned char get_proc_cpubind;
01078 unsigned char set_thisthread_cpubind;
01080 unsigned char get_thisthread_cpubind;
01082 unsigned char set_thread_cpubind;
01084 unsigned char get_thread_cpubind;
01086 unsigned char get_thisproc_last_cpu_location;
01088 unsigned char get_proc_last_cpu_location;
01090 unsigned char get_thisthread_last_cpu_location;
01091 };
01092
01098 struct hwloc_topology_membind_support {
01100 unsigned char set_thisproc_membind;
01102 unsigned char get_thisproc_membind;
01104 unsigned char set_proc_membind;
01106 unsigned char get_proc_membind;
01108 unsigned char set_thisthread_membind;
01110 unsigned char get_thisthread_membind;
01112 unsigned char set_area_membind;
01114 unsigned char get_area_membind;
01116 unsigned char alloc_membind;
01118 unsigned char firsttouch_membind;
01120 unsigned char bind_membind;
01122 unsigned char interleave_membind;
01124 unsigned char replicate_membind;
01126 unsigned char nexttouch_membind;
01128 unsigned char migrate_membind;
01130 unsigned char get_area_memlocation;
01131 };
01132
01139 struct hwloc_topology_support {
01140 struct hwloc_topology_discovery_support *discovery;
01141 struct hwloc_topology_cpubind_support *cpubind;
01142 struct hwloc_topology_membind_support *membind;
01143 };
01144
01154 HWLOC_DECLSPEC const struct hwloc_topology_support *hwloc_topology_get_support(hwloc_topology_t __hwloc_restrict topology);
01155
01166 HWLOC_DECLSPEC void hwloc_topology_set_userdata(hwloc_topology_t topology, const void *userdata);
01167
01173 HWLOC_DECLSPEC void * hwloc_topology_get_userdata(hwloc_topology_t topology);
01174
01195 HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
01196
01221 HWLOC_DECLSPEC int hwloc_get_type_depth (hwloc_topology_t topology, hwloc_obj_type_t type);
01222
01223 enum hwloc_get_type_depth_e {
01224 HWLOC_TYPE_DEPTH_UNKNOWN = -1,
01225 HWLOC_TYPE_DEPTH_MULTIPLE = -2,
01226 HWLOC_TYPE_DEPTH_BRIDGE = -3,
01227 HWLOC_TYPE_DEPTH_PCI_DEVICE = -4,
01228 HWLOC_TYPE_DEPTH_OS_DEVICE = -5
01229 };
01230
01245 static __hwloc_inline int
01246 hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
01247
01262 static __hwloc_inline int
01263 hwloc_get_type_or_above_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
01264
01271 HWLOC_DECLSPEC hwloc_obj_type_t hwloc_get_depth_type (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure;
01272
01275 HWLOC_DECLSPEC unsigned hwloc_get_nbobjs_by_depth (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure;
01276
01282 static __hwloc_inline int
01283 hwloc_get_nbobjs_by_type (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
01284
01290 static __hwloc_inline hwloc_obj_t
01291 hwloc_get_root_obj (hwloc_topology_t topology) __hwloc_attribute_pure;
01292
01294 HWLOC_DECLSPEC hwloc_obj_t hwloc_get_obj_by_depth (hwloc_topology_t topology, unsigned depth, unsigned idx) __hwloc_attribute_pure;
01295
01302 static __hwloc_inline hwloc_obj_t
01303 hwloc_get_obj_by_type (hwloc_topology_t topology, hwloc_obj_type_t type, unsigned idx) __hwloc_attribute_pure;
01304
01309 static __hwloc_inline hwloc_obj_t
01310 hwloc_get_next_obj_by_depth (hwloc_topology_t topology, unsigned depth, hwloc_obj_t prev);
01311
01318 static __hwloc_inline hwloc_obj_t
01319 hwloc_get_next_obj_by_type (hwloc_topology_t topology, hwloc_obj_type_t type,
01320 hwloc_obj_t prev);
01321
01337 HWLOC_DECLSPEC const char * hwloc_obj_type_string (hwloc_obj_type_t type) __hwloc_attribute_const;
01338
01352 HWLOC_DECLSPEC int hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t obj,
01353 int verbose);
01354
01366 HWLOC_DECLSPEC int hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t obj, const char * __hwloc_restrict separator,
01367 int verbose);
01368
01376 HWLOC_DECLSPEC int hwloc_obj_cpuset_snprintf(char * __hwloc_restrict str, size_t size, size_t nobj, const hwloc_obj_t * __hwloc_restrict objs);
01377
01407 HWLOC_DECLSPEC int hwloc_obj_type_sscanf(const char *string,
01408 hwloc_obj_type_t *typep,
01409 int *depthattrp,
01410 void *typeattrp, size_t typeattrsize);
01411
01427 static __hwloc_inline const char *
01428 hwloc_obj_get_info_by_name(hwloc_obj_t obj, const char *name) __hwloc_attribute_pure;
01429
01444 HWLOC_DECLSPEC void hwloc_obj_add_info(hwloc_obj_t obj, const char *name, const char *value);
01445
01517 typedef enum {
01520 HWLOC_CPUBIND_PROCESS = (1<<0),
01521
01524 HWLOC_CPUBIND_THREAD = (1<<1),
01525
01549 HWLOC_CPUBIND_STRICT = (1<<2),
01550
01566 HWLOC_CPUBIND_NOMEMBIND = (1<<3)
01567 } hwloc_cpubind_flags_t;
01568
01574 HWLOC_DECLSPEC int hwloc_set_cpubind(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags);
01575
01581 HWLOC_DECLSPEC int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
01582
01594 HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags);
01595
01607 HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
01608
01609 #ifdef hwloc_thread_t
01610
01617 HWLOC_DECLSPEC int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_const_cpuset_t set, int flags);
01618 #endif
01619
01620 #ifdef hwloc_thread_t
01621
01628 HWLOC_DECLSPEC int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_cpuset_t set, int flags);
01629 #endif
01630
01644 HWLOC_DECLSPEC int hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
01645
01662 HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
01663
01745 typedef enum {
01755 HWLOC_MEMBIND_DEFAULT = 0,
01756
01765 HWLOC_MEMBIND_FIRSTTOUCH = 1,
01766
01769 HWLOC_MEMBIND_BIND = 2,
01770
01778 HWLOC_MEMBIND_INTERLEAVE = 3,
01779
01791 HWLOC_MEMBIND_REPLICATE = 4,
01792
01798 HWLOC_MEMBIND_NEXTTOUCH = 5,
01799
01804 HWLOC_MEMBIND_MIXED = -1
01805 } hwloc_membind_policy_t;
01806
01820 typedef enum {
01825 HWLOC_MEMBIND_PROCESS = (1<<0),
01826
01830 HWLOC_MEMBIND_THREAD = (1<<1),
01831
01838 HWLOC_MEMBIND_STRICT = (1<<2),
01839
01844 HWLOC_MEMBIND_MIGRATE = (1<<3),
01845
01857 HWLOC_MEMBIND_NOCPUBIND = (1<<4),
01858
01869 HWLOC_MEMBIND_BYNODESET = (1<<5)
01870 } hwloc_membind_flags_t;
01871
01884 HWLOC_DECLSPEC int hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
01885
01901 HWLOC_DECLSPEC int hwloc_set_membind(hwloc_topology_t topology, hwloc_const_bitmap_t set, hwloc_membind_policy_t policy, int flags);
01902
01944 HWLOC_DECLSPEC int hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
01945
01990 HWLOC_DECLSPEC int hwloc_get_membind(hwloc_topology_t topology, hwloc_bitmap_t set, hwloc_membind_policy_t * policy, int flags);
01991
02001 HWLOC_DECLSPEC int hwloc_set_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
02002
02015 HWLOC_DECLSPEC int hwloc_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_bitmap_t set, hwloc_membind_policy_t policy, int flags);
02016
02053 HWLOC_DECLSPEC int hwloc_get_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
02054
02094 HWLOC_DECLSPEC int hwloc_get_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_bitmap_t set, hwloc_membind_policy_t * policy, int flags);
02095
02103 HWLOC_DECLSPEC int hwloc_set_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
02104
02115 HWLOC_DECLSPEC int hwloc_set_area_membind(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_bitmap_t set, hwloc_membind_policy_t policy, int flags);
02116
02141 HWLOC_DECLSPEC int hwloc_get_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
02142
02170 HWLOC_DECLSPEC int hwloc_get_area_membind(hwloc_topology_t topology, const void *addr, size_t len, hwloc_bitmap_t set, hwloc_membind_policy_t * policy, int flags);
02171
02191 HWLOC_DECLSPEC int hwloc_get_area_memlocation(hwloc_topology_t topology, const void *addr, size_t len, hwloc_bitmap_t set, int flags);
02192
02200 HWLOC_DECLSPEC void *hwloc_alloc(hwloc_topology_t topology, size_t len);
02201
02213 HWLOC_DECLSPEC void *hwloc_alloc_membind_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
02214
02229 HWLOC_DECLSPEC void *hwloc_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_bitmap_t set, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
02230
02237 static __hwloc_inline void *
02238 hwloc_alloc_membind_policy_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
02239
02249 static __hwloc_inline void *
02250 hwloc_alloc_membind_policy(hwloc_topology_t topology, size_t len, hwloc_const_bitmap_t set, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
02251
02255 HWLOC_DECLSPEC int hwloc_free(hwloc_topology_t topology, void *addr, size_t len);
02256
02279 HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object_by_cpuset(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, const char *name);
02280
02296 HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object_by_parent(hwloc_topology_t topology, hwloc_obj_t parent, const char *name);
02297
02299 enum hwloc_restrict_flags_e {
02304 HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES = (1UL<<0),
02305
02310 HWLOC_RESTRICT_FLAG_ADAPT_MISC = (1UL<<1),
02311
02316 HWLOC_RESTRICT_FLAG_ADAPT_IO = (1UL<<2)
02317 };
02318
02340 HWLOC_DECLSPEC int hwloc_topology_restrict(hwloc_topology_t __hwloc_restrict topology, hwloc_const_cpuset_t cpuset, unsigned long flags);
02341
02375 HWLOC_DECLSPEC int hwloc_custom_insert_topology(hwloc_topology_t newtopology, hwloc_obj_t newparent, hwloc_topology_t oldtopology, hwloc_obj_t oldroot);
02376
02398 HWLOC_DECLSPEC hwloc_obj_t hwloc_custom_insert_group_object_by_parent(hwloc_topology_t topology, hwloc_obj_t parent, int groupdepth);
02399
02425 HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const char *xmlpath);
02426
02448 HWLOC_DECLSPEC int hwloc_topology_export_xmlbuffer(hwloc_topology_t topology, char **xmlbuffer, int *buflen);
02449
02451 HWLOC_DECLSPEC void hwloc_free_xmlbuffer(hwloc_topology_t topology, char *xmlbuffer);
02452
02471 HWLOC_DECLSPEC void hwloc_topology_set_userdata_export_callback(hwloc_topology_t topology,
02472 void (*export_cb)(void *reserved, hwloc_topology_t topology, hwloc_obj_t obj));
02473
02499 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);
02500
02514 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);
02515
02538 HWLOC_DECLSPEC void hwloc_topology_set_userdata_import_callback(hwloc_topology_t topology,
02539 void (*import_cb)(hwloc_topology_t topology, hwloc_obj_t obj, const char *name, const void *buffer, size_t length));
02540
02552 enum hwloc_topology_export_synthetic_flags_e {
02558 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES = (1UL<<0),
02559
02566 HWLOC_TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS = (1UL<<1)
02567 };
02568
02587 HWLOC_DECLSPEC int hwloc_topology_export_synthetic(hwloc_topology_t topology, char *buffer, size_t buflen, unsigned long flags);
02588
02593 #ifdef __cplusplus
02594 }
02595 #endif
02596
02597
02598
02599 #include <hwloc/helper.h>
02600
02601
02602 #include <hwloc/inlines.h>
02603
02604
02605 #include <hwloc/diff.h>
02606
02607
02608 #include <hwloc/deprecated.h>
02609
02610 #endif