hwlocality_object_types(3)
πΈ NAME πΈ
okay so bestie, this is hwlocality_object_types β aka Object Types β from the Library Functions Manual. It's the hwlocality_object_types(3) page, and it's literally all about the object types in hwloc. π
β¨ SYNOPSIS β¨
π Macros π
#define HWLOC_TYPE_UNORDERED
π§ Typedefs π§
typedef enum hwloc_obj_cache_type_e hwloc_obj_cache_type_t
typedef enum hwloc_obj_bridge_type_e hwloc_obj_bridge_type_t
typedef enum hwloc_obj_osdev_type_e hwloc_obj_osdev_type_t
π₯ Enumerations π₯
enum hwloc_obj_type_t { HWLOC_OBJ_MACHINE, HWLOC_OBJ_PACKAGE,
HWLOC_OBJ_CORE, HWLOC_OBJ_PU, HWLOC_OBJ_L1CACHE, HWLOC_OBJ_L2CACHE,
HWLOC_OBJ_L3CACHE, HWLOC_OBJ_L4CACHE, HWLOC_OBJ_L5CACHE,
HWLOC_OBJ_L1ICACHE, HWLOC_OBJ_L2ICACHE, HWLOC_OBJ_L3ICACHE,
HWLOC_OBJ_GROUP, HWLOC_OBJ_NUMANODE, HWLOC_OBJ_BRIDGE,
HWLOC_OBJ_PCI_DEVICE, HWLOC_OBJ_OS_DEVICE, HWLOC_OBJ_MISC,
HWLOC_OBJ_MEMCACHE, HWLOC_OBJ_DIE, HWLOC_OBJ_TYPE_MAX }
enum hwloc_obj_cache_type_e { HWLOC_OBJ_CACHE_UNIFIED,
HWLOC_OBJ_CACHE_DATA, HWLOC_OBJ_CACHE_INSTRUCTION }
enum hwloc_obj_bridge_type_e { HWLOC_OBJ_BRIDGE_HOST,
HWLOC_OBJ_BRIDGE_PCI }
enum hwloc_obj_osdev_type_e { HWLOC_OBJ_OSDEV_BLOCK,
HWLOC_OBJ_OSDEV_GPU, HWLOC_OBJ_OSDEV_NETWORK,
HWLOC_OBJ_OSDEV_OPENFABRICS, HWLOC_OBJ_OSDEV_DMA,
HWLOC_OBJ_OSDEV_COPROC }
π«Ά Functions π«Ά
int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2)
π¬ DETAILED DESCRIPTION π¬
The original drops this heading in with no extra prose underneath it, so we're keeping it iconic and empty. No extra lore here, bestie. π¦
π MACRO DEFINITION DOCUMENTATION π
π #define HWLOC_TYPE_UNORDERED π
This is the value returned by hwloc_compare_types() when types can not be compared. That's it, that's the macro. π
π§ TYPEDEF DOCUMENTATION π§
typedef enum hwloc_obj_bridge_type_e hwloc_obj_bridge_type_tβ Type of one side (upstream or downstream) of an I/O bridge.typedef enum hwloc_obj_cache_type_e hwloc_obj_cache_type_tβ Cache type.typedef enum hwloc_obj_osdev_type_e hwloc_obj_osdev_type_tβ Type of a OS device.
π ENUMERATION TYPE DOCUMENTATION π
π enum hwloc_obj_bridge_type_e
Type of one side (upstream or downstream) of an I/O bridge.
Enumerator
HWLOC_OBJ_BRIDGE_HOSTβ Host-side of a bridge, only possible upstream.HWLOC_OBJ_BRIDGE_PCIβ PCI-side of a bridge.
π§ enum hwloc_obj_cache_type_e
Cache type.
Enumerator
HWLOC_OBJ_CACHE_UNIFIEDβ Unified cache.HWLOC_OBJ_CACHE_DATAβ Data cache.HWLOC_OBJ_CACHE_INSTRUCTIONβ Instruction cache (filtered out by default).
π₯οΈ enum hwloc_obj_osdev_type_e
Type of a OS device.
Enumerator
HWLOC_OBJ_OSDEV_BLOCKβ Operating system block device, or non-volatile memory device. For instance"sda"or"dax2.0"on Linux.HWLOC_OBJ_OSDEV_GPUβ Operating system GPU device. For instance":0.0"for a GL display,"card0"for a Linux DRM device.HWLOC_OBJ_OSDEV_NETWORKβ Operating system network device. For instance the"eth0"interface on Linux.HWLOC_OBJ_OSDEV_OPENFABRICSβ Operating system openfabrics device. For instance the"mlx4_0"InfiniBand HCA,"hfi1_0"Omni-Path interface, or"bxi0"Atos/Bull BXI HCA on Linux.HWLOC_OBJ_OSDEV_DMAβ Operating system dma engine device. For instance the"dma0chan0"DMA channel on Linux.HWLOC_OBJ_OSDEV_COPROCβ Operating system co-processor device. For instance"opencl0d0"for a OpenCL device,"cuda0"for a CUDA device.
π enum hwloc_obj_type_t
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_MACHINEβ Machine. A set of processors and memory with cache coherency. This type is always used for the root object of a topology, and never used anywhere else. Hence its parent is alwaysNULL.HWLOC_OBJ_PACKAGEβ Physical package. The physical package that usually gets inserted into a socket on the motherboard. A processor package usually contains multiple cores, and possibly some dies.HWLOC_OBJ_COREβ Core. A computation unit (may be shared by several PUs, aka logical processors).HWLOC_OBJ_PUβ Processing Unit, or (Logical) Processor. An execution unit (may share a core with some other logical processors, e.g. in the case of an SMT core). This is the smallest object representing CPU resources, it cannot have any child except Misc objects.
Objects of this kind are always reported and can thus be used as fallback when others are not.
HWLOC_OBJ_L1CACHEβ Level 1 Data (or Unified) Cache.HWLOC_OBJ_L2CACHEβ Level 2 Data (or Unified) Cache.HWLOC_OBJ_L3CACHEβ Level 3 Data (or Unified) Cache.HWLOC_OBJ_L4CACHEβ Level 4 Data (or Unified) Cache.HWLOC_OBJ_L5CACHEβ Level 5 Data (or Unified) Cache.HWLOC_OBJ_L1ICACHEβ Level 1 instruction Cache (filtered out by default).HWLOC_OBJ_L2ICACHEβ Level 2 instruction Cache (filtered out by default).HWLOC_OBJ_L3ICACHEβ Level 3 instruction Cache (filtered out by default).HWLOC_OBJ_GROUPβ Group 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 operating systems expose their arbitrary processors aggregation this way. And hwloc may insert such objects to group NUMA nodes according to their distances. See also What are these Group objects in my topology?. These objects are removed when they do not bring any structure (seeHWLOC_TYPE_FILTER_KEEP_STRUCTURE).HWLOC_OBJ_NUMANODEβ NUMA node. An object that contains memory that is directly and byte-accessible to the host processors. It is usually close to some cores (the corresponding objects are descendants of the NUMA node object in the hwloc tree). This is the smallest object representing Memory resources, it cannot have any child except Misc objects. However it may have Memory-side cache parents.
NUMA nodes may correspond to different kinds of memory (DRAM, HBM, CXL-DRAM, etc.). When hwloc is able to guess that kind, it is specified in the subtype field of the object. See also Normal attributes in the main documentation.
There is always at least one such object in the topology even if the machine is not NUMA.
Memory objects are not listed in the main children list, but rather in the dedicated Memory children list.
NUMA nodes have a special depth HWLOC_TYPE_DEPTH_NUMANODE instead of a normal depth just like other objects in the main tree.
HWLOC_OBJ_BRIDGEβ Bridge (filtered out by default). Any bridge (or PCI switch) that connects the host or an I/O bus, to another I/O bus. Bridges are not added to the topology unless their filtering is changed (seehwloc_topology_set_type_filter()andhwloc_topology_set_io_types_filter()).
I/O objects are not listed in the main children list, but rather in the dedicated io children list. I/O objects have NULL CPU and node sets.
HWLOC_OBJ_PCI_DEVICEβ PCI device (filtered out by default). PCI devices are not added to the topology unless their filtering is changed (seehwloc_topology_set_type_filter()andhwloc_topology_set_io_types_filter()).
I/O objects are not listed in the main children list, but rather in the dedicated io children list. I/O objects have NULL CPU and node sets.
HWLOC_OBJ_OS_DEVICEβ Operating system device (filtered out by default). OS devices are not added to the topology unless their filtering is changed (seehwloc_topology_set_type_filter()andhwloc_topology_set_io_types_filter()).
I/O objects are not listed in the main children list, but rather in the dedicated io children list. I/O objects have NULL CPU and node sets.
HWLOC_OBJ_MISCβ Miscellaneous objects (filtered out by default). Objects without particular meaning, that can e.g. be added by the application for its own use, or by hwloc for miscellaneous objects such as MemoryModule (DIMMs). They are not added to the topology unless their filtering is changed (seehwloc_topology_set_type_filter()).
These objects are not listed in the main children list, but rather in the dedicated misc children list. Misc objects may only have Misc objects as children, and those are in the dedicated misc children list as well. Misc objects have NULL CPU and node sets.
HWLOC_OBJ_MEMCACHEβ Memory-side cache (filtered out by default). A cache in front of a specific NUMA node. This object always has at least one NUMA node as a memory child.
Memory objects are not listed in the main children list, but rather in the dedicated Memory children list.
Memory-side cache have a special depth HWLOC_TYPE_DEPTH_MEMCACHE instead of a normal depth just like other objects in the main tree.
HWLOC_OBJ_DIEβ Die within a physical package. A subpart of the physical package, that contains multiple cores. Some operating systems (e.g. Linux) may expose a single die per package even if the hardware does not support dies at all. To avoid showing such non-existing dies, hwloc will filter them out if all of them are identical to packages. This is functionally equivalent toHWLOC_TYPE_FILTER_KEEP_STRUCTUREbeing enforced for Dies versus Packages.
π§ 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.
Returns
- A negative integer if
type1objects usually includetype2objects. - A positive integer if
type1objects are usually included intype2objects. 0iftype1andtype2objects are the same.HWLOC_TYPE_UNORDEREDif objects cannot be compared (because neither is usually contained in the other).
Note β Object types containing CPUs can always be compared (usually, a machine contains packages, which contain caches, which contain cores, which contain PUs).
HWLOC_OBJ_PUwill always be the deepest, whileHWLOC_OBJ_MACHINEis always the highest.
This does not mean that the actual topology will respect that order: e.g. as of today cores may also contain caches, and packages may also contain nodes. This is thus just to be seen as a fallback comparison method.
βοΈ AUTHOR βοΈ
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
mwah π β signing off from the Hardware Locality (hwloc) manual, Version 2.15.0, page hwlocality_object_types(3). That's the footer tea, and there's no separate date printed in the footer, bestie. π«Άβ¨
π¦ where this page comes from
- arch rolling: hwloc 2.15.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms