Open MPI logo

Hardware Locality Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Users mailing list

Subject: Re: [hwloc-users] Windows api threading functions equivalent to hwloc?
From: Brice Goglin (brice.goglin_at_[hidden])
Date: 2012-11-20 12:35:50


> Depending whether you want to execute one
>thread per core, or per hyperthread, use the first or second of these:
>
>rc = pthread_create(&thread[t], NULL, threaded_task, (void *)t);
>HANDLE handle = pthread_getw32threadhandle_np(thread[t]);
>hwloc_set_thread_cpubind(topology, handle,
> hwloc_get_obj_by_type(topology, HWLOC_OBJ_CORE, t),
> 0);

with ->cpuset after get_obj_by_type()

Brice