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) {
8787void INTERNAL qt_affinity_init (qthread_shepherd_id_t * nbshepherds ,
8888 qthread_worker_id_t * nbworkers ,
8989 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
9094 // Note: the lack of a teardown routine will cause topology initialization
9195 // to be skipped if qthreads is re-initialized
9296 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,
8686 qthread_worker_id_t * nbworkers ,
8787 size_t * hw_par ) {
8888 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
8993 if (topology == NULL ) {
9094 qassert (hwloc_topology_init (& topology ), 0 );
9195 qassert (hwloc_topology_load (topology ), 0 );
You can’t perform that action at this time.
0 commit comments