|
Hardware Locality (hwloc)
master-20250612.1317.gitd03ae8e67
|
Enumerations | |
| enum | hwloc_modify_infos_op_e { HWLOC_MODIFY_INFOS_OP_ADD, HWLOC_MODIFY_INFOS_OP_ADD_UNIQUE, HWLOC_MODIFY_INFOS_OP_REPLACE, HWLOC_MODIFY_INFOS_OP_REMOVE } |
Functions | |
| const char * | hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char *name) |
| const char * | hwloc_get_info_by_name (struct hwloc_infos_s *infos, const char *name) |
| int | hwloc_modify_infos (struct hwloc_infos_s *infos, unsigned long operation, const char *name, const char *value) |
| int | hwloc_obj_add_info (hwloc_obj_t obj, const char *name, const char *value) |
| struct hwloc_infos_s * | hwloc_topology_get_infos (hwloc_topology_t topology) |
| int | hwloc_obj_set_subtype (hwloc_topology_t topology, hwloc_obj_t obj, const char *subtype) |
Operations given to hwloc_modify_infos().
|
inline |
Search the given name in the array of infos and return the corresponding value.
If multiple info attributes match the given name, only the first one is returned.
NULL if no such info attribute exists.| int hwloc_modify_infos | ( | struct hwloc_infos_s * | infos, |
| unsigned long | operation, | ||
| const char * | name, | ||
| const char * | value | ||
| ) |
Modify an array of info attributes.
operation is a single value among hwloc_modify_infos_op_e.
If adding (HWLOC_MODIFY_INFOS_OP_ADD or HWLOC_MODIFY_INFOS_OP_ADD_UNIQUE) or replacing (HWLOC_MODIFY_INFOS_OP_REPLACE) an info attribute, name and value cannot be NULL. The input strings are copied before being added in the object infos.
If removing existing info pairs (HWLOC_MODIFY_INFOS_OP_REMOVE), name and/or value may be non NULL to specify which pair(s) to remove. If both name and value are NULL, all pairs are removed.
0 if the request was valid but no change was applied. -1 on error.value contains some non-printable characters, they will be dropped when exporting to XML, see hwloc_topology_export_xml() in hwloc/export.h.
|
inline |
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. See hwloc_modify_infos() for a more flexible variant.
The input strings are copied before being added in the object infos.
name and value must be non NULL.
0 on success, -1 on error.name or value contain some non-printable characters, they will be dropped when exporting to XML, see hwloc_topology_export_xml() in hwloc/export.h.
|
inline |
Search the given name in the object array of infos and return the corresponding value.
Identical to hwloc_get_info_by_name() but operates on the infos of the given object.
| 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, 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.
0 on success. -1 with errno set to ENOMEM on failure to allocate memory. | struct hwloc_infos_s* hwloc_topology_get_infos | ( | hwloc_topology_t | topology | ) |
Get the structure of info attributes attached to the topology.
These attributes contain information about the topology discovery (backends) and about the operating system.
NULL.
1.8.17