Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v0.9.3

  |   Home   |   Support   |   FAQ   |  

Topology Object Types

Defines

#define HWLOC_TYPE_UNORDERED   INT_MAX
 Value returned by hwloc_compare_types when types can not be compared.

Enumerations

enum  hwloc_obj_type_t {
  HWLOC_OBJ_SYSTEM, HWLOC_OBJ_MACHINE, HWLOC_OBJ_NODE, HWLOC_OBJ_SOCKET,
  HWLOC_OBJ_CACHE, HWLOC_OBJ_CORE, HWLOC_OBJ_PROC, HWLOC_OBJ_MISC
}
 

Type of topology object.

More...

Functions

int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2)
 Compare the depth of two object types.

Define Documentation

#define HWLOC_TYPE_UNORDERED   INT_MAX

Value returned by hwloc_compare_types when types can not be compared.


Enumeration Type Documentation

Type of topology object.

Note:
Do not rely on the ordering or completeness of the values as new ones may be defined in the future! If you need to compare types, use hwloc_compare_types() instead.
Enumerator:
HWLOC_OBJ_SYSTEM 

Whole system (may be a cluster of machines). The whole system that is accessible to hwloc. That may comprise several machines in SSI systems like Kerrighed.

HWLOC_OBJ_MACHINE 

Machine. A set of processors and memory with cache coherency.

HWLOC_OBJ_NODE 

NUMA node. A set of processors around memory which the processors can directly access.

HWLOC_OBJ_SOCKET 

Socket, physical package, or chip. In the physical meaning, i.e. that you can add or remove physically.

HWLOC_OBJ_CACHE 

Data cache. Can be L1, L2, L3, ...

HWLOC_OBJ_CORE 

Core. A computation unit (may be shared by several logical processors).

HWLOC_OBJ_PROC 

(Logical) Processor. An execution unit (may share a core with some other logical processors, e.g. in the case of an SMT core).

Objects of this kind are always reported and can thus be used as fallback when others are not.

HWLOC_OBJ_MISC 

Miscellaneous objects. Objects which do not fit in the above but are detected by hwloc and are useful to take into account for affinity. For instance, some OSes expose their arbitrary processors aggregation this way.


Function Documentation

int hwloc_compare_types ( hwloc_obj_type_t  type1,
hwloc_obj_type_t  type2 
)

Compare the depth of two object types.

Types shouldn't be compared as they are, since newer ones may be added in the future. This function returns less than, equal to, or greater than zero if type1 is considered to be respectively higher than, equal to, or deeper than type2 in the hierarchy. If the types can not be compared (because it does not make sense), HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always be compared.

Note:
HWLOC_OBJ_SYSTEM will always be the highest, and HWLOC_OBJ_PROC will always be the deepest.