@@ -97,6 +97,21 @@ typedef struct {
97
97
size_t mbs_len ;
98
98
} prte_hwloc_base_memory_segment_t ;
99
99
100
+
101
+ /**
102
+ * Struct used to cache topology-level data used
103
+ * for repeated lookup - the struct is attached
104
+ * to the userdata of the root object of the
105
+ * topology
106
+ */
107
+ typedef struct {
108
+ pmix_object_t super ;
109
+ bool computed ;
110
+ unsigned numa_cutoff ;
111
+ } prte_hwloc_topo_data_t ;
112
+ PRTE_EXPORT PMIX_CLASS_DECLARATION (prte_hwloc_topo_data_t );
113
+
114
+
100
115
/* define binding policies */
101
116
typedef uint16_t prte_binding_policy_t ;
102
117
#define PRTE_BINDING_POLICY PRTE_UINT16
@@ -226,20 +241,28 @@ PRTE_EXPORT extern prte_hwloc_base_mbfa_t prte_hwloc_base_mbfa;
226
241
* hwloc_topology_load()).
227
242
*/
228
243
PRTE_EXPORT int prte_hwloc_base_get_topology (void );
229
- PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_setup_summary (hwloc_topology_t topo );
230
244
231
245
/**
232
246
* Set the hwloc topology to that from the given topo file
233
247
*/
234
248
PRTE_EXPORT int prte_hwloc_base_set_topology (char * topofile );
235
249
250
+ PRTE_EXPORT void prte_hwloc_base_setup_summary (hwloc_topology_t topo );
251
+
236
252
PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_generate_cpuset (hwloc_topology_t topo ,
237
253
bool use_hwthread_cpus , char * cpulist );
238
254
239
255
PRTE_EXPORT hwloc_cpuset_t prte_hwloc_base_filter_cpus (hwloc_topology_t topo );
240
256
241
257
PRTE_EXPORT unsigned int prte_hwloc_base_get_obj_idx (hwloc_topology_t topo , hwloc_obj_t obj );
242
258
259
+ PRTE_EXPORT unsigned int prte_hwloc_base_get_nbobjs_by_type (hwloc_topology_t topo ,
260
+ hwloc_obj_type_t target );
261
+
262
+ PRTE_EXPORT hwloc_obj_t prte_hwloc_base_get_obj_by_type (hwloc_topology_t topo ,
263
+ hwloc_obj_type_t target ,
264
+ unsigned int instance );
265
+
243
266
/**
244
267
* Get the number of pu's under a given hwloc object.
245
268
*/
0 commit comments