Gabriele Fatigati, le Tue 09 Aug 2011 18:14:55 +0200, a écrit :
> hwloc_get_cpubind() function, return, according to the manual, "current process
> or thread binding". What does it means?
The cpuset to which the current process or thread (according to flags)
was last bound to. That is, the converse of set_cpubind().
> It return cpu index where process/ thread runs?
No, hwloc_get_last_cpu_location() does that.
> If yes, which cpuset I have to use in function arguments?
get_cpubind returns a cpuset, you just provide one you have allocated
the way you prefer.
> Could you give me a little example to use it?
It is really just the converse of hwloc_set_cpubind(), so for instance:
set = hwloc_bitmap_alloc();
hwloc_get_cpubind(topology, &set, 0)
Samuel
|