File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ static int qt_affinity_compact(int num_workers, hwloc_obj_t obj) {
87
87
void INTERNAL qt_affinity_init (qthread_shepherd_id_t * nbshepherds ,
88
88
qthread_worker_id_t * nbworkers ,
89
89
size_t * hw_par ) {
90
+ #ifdef HWLOC_GET_TOPOLOGY_FUNCTION
91
+ extern void * HWLOC_GET_TOPOLOGY_FUNCTION ;
92
+ topology = (hwloc_topology_t )HWLOC_GET_TOPOLOGY_FUNCTION ;
93
+ #endif
90
94
// Note: the lack of a teardown routine will cause topology initialization
91
95
// to be skipped if qthreads is re-initialized
92
96
if (topology == NULL ) {
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ void INTERNAL qt_affinity_init(qthread_shepherd_id_t *nbshepherds,
86
86
qthread_worker_id_t * nbworkers ,
87
87
size_t * hw_par ) {
88
88
if (qthread_cas (& initialized , 0 , 1 ) == 0 ) {
89
+ #ifdef HWLOC_GET_TOPOLOGY_FUNCTION
90
+ extern void * HWLOC_GET_TOPOLOGY_FUNCTION ;
91
+ topology = (hwloc_topology_t )HWLOC_GET_TOPOLOGY_FUNCTION ;
92
+ #endif
89
93
if (topology == NULL ) {
90
94
qassert (hwloc_topology_init (& topology ), 0 );
91
95
qassert (hwloc_topology_load (topology ), 0 );
You can’t perform that action at this time.
0 commit comments