On Apr 13, 2011, at 1:32 PM, Brice Goglin wrote:

> Don't worry about the depth. Even if you have less levels of caches in
> some parts of the machine, or no hyperthreading or whatever different,
> we still build levels of identical objects. So you still get a
> consistent depth for all cores, threads, sockets, and different levels
> of caches. But obviously, you will see less objects when iterating
> through levels within the "smaller" part of the machine.

This would be good to add to the documentation; I've been doing manual 
traversals of hwloc trees just to future-proof/heterogeneous-proof my code 
(because I didn't know that the depth would always be the same for a given 
object type even if some branches don't have all object types).

So let's say I have a (fictitious) machine with one socket with an L1 and L2 
cache for its cores, and another socket that only has an L1 cache for its cores:

                    numa_node
                /               \
      socket 0                     socket 1
        L2                           L1
        L1                           core
        core

If I traverse down through children in the tree, are you saying that there will 
be some kind of fake/empty object in the right sub tree corresponding to where 
the L2 is in the left sub tree?

-- 
Jeff Squyres
[email protected]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to