hwlocality_info_attr(3)
π hwlocality_info_attr(3) β Consulting and Adding Info Attributes π
okay bestie, welcome to the hwlocality_info_attr(3) page from the Hardware Locality (hwloc) Library Functions Manual. This whole page is about consulting and adding info attributes, and it's lowkey giving "metadata but make it cute" β¨π
π NAME π
hwlocality_info_attr β Consulting and Adding Info Attributes π
β¨ SYNOPSIS β¨
π§ Functions π§
const char * hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char
*name)
int hwloc_obj_add_info (hwloc_obj_t obj, const char * name, const char *
value)
int hwloc_obj_set_subtype (hwloc_topology_t topology, hwloc_obj_t obj,
const char *subtype)
π¦ Detailed Description π¦
Okay so this section is literally just a heading in the original β no extra prose, no cap. We're sliding straight into the function docs, bestie. π«Ά
π Function Documentation π
π hwloc_obj_add_info π
int hwloc_obj_add_info (hwloc_obj_t obj, const char * name, const char *
value)
Add the given name and value pair to the given object info attributes. The info pair is appended to the existing info array even if another pair with the same name already exists β yes, duplicates are allowed, fr fr.
The input strings are copied before being added in the object infos.
Returns:
0on success.-1on error.
Note: This function may be used to enforce object colors in thelstopographical output by addinglstopoStyleas a name andBackground=#rrggbbas a value. SeeCUSTOM COLORSin thelstopo(1)manpage for details. π¨
Note: Ifnameorvaluecontain some non-printable characters, they will be dropped when exporting to XML β seehwloc_topology_export_xml()inhwloc/export.h. π
π hwloc_obj_get_info_by_name π
[inline]
const char * hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char
*name)
Search the given name in object infos and return the corresponding value. If multiple info attributes match the given name, only the first one is returned. iykyk.
Returns:
- A pointer to the value string if it exists.
NULLif no such info attribute exists.
Note: The string should not be freed by the caller β it belongs to the hwloc library, bestie. π«Ά
π hwloc_obj_set_subtype π
int hwloc_obj_set_subtype (hwloc_topology_t topology, hwloc_obj_t obj,
const char *subtype)
Set (or replace) the subtype of an object. The given subtype is copied internally, and the caller is responsible for freeing the original subtype if needed.
If another subtype already exists in object, it is replaced. The given subtype may be NULL to remove the existing subtype. β¨
Note: This function is mostly meant to initialize the subtype of user-added objects such as groups with hwloc_topology_alloc_group_object(). π§
Returns:
0on success.-1witherrnoset toENOMEMon failure to allocate memory. π
π Author π
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. (the robots wrote this one, bestie π€π )
π Source/version sign-off: Hardware Locality (hwloc) β Version 2.15.0 β for the hwlocality_info_attr(3) manual page. (no date in this footer, just version vibes β¨) Mwah, bye 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