Re: [hwloc-users] Windows api threading functions equivalent to hwloc?

2012-11-19 Thread Samuel Thibault
Andrew Somorjai, le Tue 20 Nov 2012 01:39:47 +0100, a écrit : > "CreateThread() and WaitForMultipleObjects() are not in hwloc since they have > nothing to do with topologies." > > I thought hwloc was also for threading? It can bind your threads, yes, but the way to create the thread is yours,

Re: [hwloc-users] Windows api threading functions equivalent to hwloc?

2012-11-19 Thread Andrew Somorjai
"CreateThread() and WaitForMultipleObjects() are not in hwloc since they have nothing to do with topologies." I thought hwloc was also for threading? "DWORD_PTR m_id = 0; DWORD_PTR m_mask = 1 << i; m_threads[i] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadMain, (LPVOID)i, NULL,

Re: [hwloc-users] Windows api threading functions equivalent to hwloc?

2012-11-19 Thread Samuel Thibault
Brice Goglin, le Mon 19 Nov 2012 21:09:33 +0100, a écrit : > hwloc_bitmap_t bitmap = hwloc_bitmap_alloc(); > hwloc_bitmap_set_only(bitmap, i); > hwloc_set_thread_cpubind(topology, m_threads[i], bitmap, 0); > hwloc_bitmap_free(bitmap); Or perhaps hwloc_set_thread_cpubind(topology, m_threads[i],

Re: [hwloc-users] Windows api threading functions equivalent to hwloc?

2012-11-19 Thread Brice Goglin
Le 19/11/2012 21:01, Andrew Somorjai a écrit : > Below I posted a simple windows thread creation C++ routine which sets > the processor affinity to two cores. > What I want is the equivalent code using hwloc. Sorry for being > somewhat new to this but I'm not sure what > api calls are equivalent

[hwloc-users] Windows api threading functions equivalent to hwloc?

2012-11-19 Thread Andrew Somorjai
Below I posted a simple windows thread creation C++ routine which sets the processor affinity to two cores. What I want is the equivalent code using hwloc. Sorry for being somewhat new to this but I'm not sure what  api calls are equivalent to the windows calls and I did search hwloc.h for