hwlocality_creation(3)
hey bestie, this is hwlocality_creation(3) from the Library Functions Manual β the page all about Topology Creation and Destruction π
β¨
πΈ NAME πΈ
hwlocality_creation β Topology Creation and Destruction π
π¦ SYNOPSIS π¦
Typedefs
typedef struct hwloc_topology * hwloc_topology_t
Functions
int hwloc_topology_init (hwloc_topology_t *topologyp)
int hwloc_topology_load (hwloc_topology_t topology)
void hwloc_topology_destroy (hwloc_topology_t topology)
int hwloc_topology_dup (hwloc_topology_t *newtopology, hwloc_topology_t
oldtopology)
int hwloc_topology_abi_check (hwloc_topology_t topology)
void hwloc_topology_check (hwloc_topology_t topology)
π Detailed Description π
bestie, this section is literally just a heading in the source β no extra description text hiding here, no secret lore. Moving on! π«Ά
π Typedef Documentation π
typedef struct hwloc_topology* hwloc_topology_t
This is the topology context π. It gets initialized with hwloc_topology_init() and built with hwloc_topology_load().
π Function Documentation π
int hwloc_topology_abi_check (hwloc_topology_t topology)
okay so this one checks that your topology is compatible with the current hwloc library β¨. Itβs highkey useful when the same topology structure is being used (in memory) by different libraries that may use different hwloc installations β for example, if one library embeds a specific version of hwloc while another library uses a default system-wide hwloc installation π.
If all libraries/programs use the same hwloc installation, this function always returns success. Slay.
Returns
0on success.-1witherrnoset toEINVALif incompatible.
Note: if youβre sharing between processes withhwloc_shmem_topology_write(), the relevant check is already performed insidehwloc_shmem_topology_adopt()π
void hwloc_topology_check (hwloc_topology_t topology)
Runs internal checks on a topology structure π§. The program aborts if an inconsistency is detected in the given topology β like, literally aborts, no cap π.
Parameters
- topology is the topology to be checked.
Note: this routine is only useful to developers. The input topology should have been previously loaded with hwloc_topology_load().
void hwloc_topology_destroy (hwloc_topology_t topology)
Terminates and frees a topology context π«Ά. Basically the cleanup era.
Parameters
- topology is the topology to be freed.
int hwloc_topology_dup (hwloc_topology_t * newtopology, hwloc_topology_t oldtopology)
Duplicates a topology π₯. The entire topology structure as well as its objects are duplicated into a new one.
This is useful for keeping a backup while modifying a topology β main character backup energy π.
Returns
0on success,-1on error.
Note: object userdata is not duplicated since hwloc does not know what it point to. The objects of both old and new topologies will point to the same userdata π.
int hwloc_topology_init (hwloc_topology_t * topologyp)
Allocates a topology context β¨.
Parameters
- topologyp is assigned a pointer to the new allocated context.
Returns
0on success,-1on error.
int hwloc_topology_load (hwloc_topology_t topology)
Builds the actual topology π. Build the actual topology once initialized with hwloc_topology_init() and tuned with Topology Detection Configuration and Query and Changing the Source of Topology Discovery routines. No other routine may be called earlier using this topology context β fr fr, thatβs the rule.
Parameters
- topology is the topology to be loaded with objects.
Returns
0on success,-1on error.
Note: on failure, the topology is reinitialized. It should be either destroyed with hwloc_topology_destroy() or configured and loaded again. This function may be called only once per topology. The binding of the current thread or process may temporarily change during this call but it will be restored before it returns π.
See also: Topology Detection Configuration and Query and Changing the Source of Topology Discovery
π Author π
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code π€π
okay thatβs the whole page, bestie β source/version vibes are Hardware Locality (hwloc), Version 2.15.0, and hwlocality_creation(3); the footer doesnβt print a separate date, so Iβm not inventing one, periodt πβ¨
π¦ 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