File indexing completed on 2026-09-15 09:18:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef PMIX_HWLOC_H
0025 #define PMIX_HWLOC_H
0026
0027 #include "src/include/pmix_config.h"
0028
0029 #include <hwloc.h>
0030
0031 #include "pmix_common.h"
0032
0033 #include "src/class/pmix_list.h"
0034 #include "src/include/pmix_globals.h"
0035 #include "src/mca/base/pmix_mca_base_framework.h"
0036 #include "src/mca/base/pmix_mca_base_var.h"
0037 #include "src/mca/mca.h"
0038 #include "src/server/pmix_server_ops.h"
0039
0040 BEGIN_C_DECLS
0041
0042
0043
0044
0045 PMIX_EXPORT pmix_status_t pmix_hwloc_register(void);
0046
0047
0048
0049
0050 PMIX_EXPORT void pmix_hwloc_finalize(void);
0051
0052
0053 PMIX_EXPORT pmix_status_t pmix_hwloc_setup_topology(pmix_info_t *info, size_t ninfo);
0054
0055
0056 PMIX_EXPORT pmix_status_t pmix_hwloc_load_topology(pmix_topology_t *topo);
0057
0058
0059 PMIX_EXPORT pmix_status_t pmix_hwloc_generate_cpuset_string(const pmix_cpuset_t *cpuset,
0060 char **cpuset_string);
0061
0062
0063 PMIX_EXPORT pmix_status_t pmix_hwloc_parse_cpuset_string(const char *cpuset_string, pmix_cpuset_t *cpuset);
0064
0065
0066 PMIX_EXPORT pmix_status_t pmix_hwloc_generate_locality_string(const pmix_cpuset_t *cpuset, char **loc);
0067
0068
0069 PMIX_EXPORT pmix_status_t pmix_hwloc_get_relative_locality(const char *locality1,
0070 const char *locality2,
0071 pmix_locality_t *loc);
0072
0073
0074 PMIX_EXPORT pmix_status_t pmix_hwloc_get_cpuset(pmix_cpuset_t *cpuset, pmix_bind_envelope_t ref);
0075
0076
0077 PMIX_EXPORT pmix_status_t pmix_hwloc_compute_distances(pmix_topology_t *topo, pmix_cpuset_t *cpuset,
0078 pmix_info_t info[], size_t ninfo,
0079 pmix_device_distance_t **dist, size_t *ndist);
0080
0081 PMIX_EXPORT pmix_status_t pmix_hwloc_check_vendor(pmix_topology_t *topo,
0082 unsigned short vendorID,
0083 uint16_t class);
0084
0085
0086 PMIX_EXPORT pmix_status_t pmix_hwloc_pack_cpuset(pmix_buffer_t *buf, pmix_cpuset_t *src,
0087 pmix_pointer_array_t *regtypes);
0088
0089 PMIX_EXPORT pmix_status_t pmix_hwloc_unpack_cpuset(pmix_buffer_t *buf, pmix_cpuset_t *dest,
0090 pmix_pointer_array_t *regtypes);
0091
0092 PMIX_EXPORT pmix_status_t pmix_hwloc_copy_cpuset(pmix_cpuset_t *dest, pmix_cpuset_t *src);
0093
0094 PMIX_EXPORT char *pmix_hwloc_print_cpuset(pmix_cpuset_t *src);
0095
0096 PMIX_EXPORT void pmix_hwloc_destruct_cpuset(pmix_cpuset_t *cpuset);
0097
0098 PMIX_EXPORT void pmix_hwloc_release_cpuset(pmix_cpuset_t *ptr, size_t sz);
0099
0100 PMIX_EXPORT pmix_status_t pmix_hwloc_get_cpuset_size(pmix_cpuset_t *ptr, size_t *sz);
0101
0102
0103 PMIX_EXPORT pmix_status_t pmix_hwloc_pack_topology(pmix_buffer_t *buf, pmix_topology_t *src,
0104 pmix_pointer_array_t *regtypes);
0105
0106 PMIX_EXPORT pmix_status_t pmix_hwloc_unpack_topology(pmix_buffer_t *buf, pmix_topology_t *dest,
0107 pmix_pointer_array_t *regtypes);
0108
0109 PMIX_EXPORT pmix_status_t pmix_hwloc_copy_topology(pmix_topology_t *dest, pmix_topology_t *src);
0110
0111 PMIX_EXPORT char *pmix_hwloc_print_topology(pmix_topology_t *src);
0112
0113 PMIX_EXPORT void pmix_hwloc_destruct_topology(pmix_topology_t *ptr);
0114
0115 PMIX_EXPORT void pmix_hwloc_release_topology(pmix_topology_t *ptr, size_t sz);
0116
0117 PMIX_EXPORT pmix_status_t pmix_hwloc_get_topology_size(pmix_topology_t *ptr, size_t *sz);
0118
0119
0120 PMIX_EXPORT void pmix_ploc_base_destruct_cpuset(pmix_cpuset_t *cpuset);
0121 PMIX_EXPORT void pmix_ploc_base_release_cpuset(pmix_cpuset_t *ptr, size_t sz);
0122 PMIX_EXPORT void pmix_ploc_base_destruct_topology(pmix_topology_t *ptr);
0123 PMIX_EXPORT void pmix_ploc_base_release_topology(pmix_topology_t *ptr, size_t sz);
0124
0125 END_C_DECLS
0126
0127 #endif