Scroll to navigation

Object/String Conversion(3) Hardware Locality (hwloc) Object/String Conversion(3)

NAME

Object/String Conversion -

Functions


const char * hwloc_obj_type_string (hwloc_obj_type_t type)
hwloc_obj_type_t hwloc_obj_type_of_string (const char *string)
int hwloc_obj_type_snprintf (char *restrict string, size_t size, hwloc_obj_t obj, int verbose)
int hwloc_obj_attr_snprintf (char *restrict string, size_t size, hwloc_obj_t obj, const char *restrict separator, int verbose)
int hwloc_obj_snprintf (char *restrict string, size_t size, hwloc_topology_t topology, hwloc_obj_t obj, const char *restrict indexprefix, int verbose)
int hwloc_obj_cpuset_snprintf (char *restrict str, size_t size, size_t nobj, const hwloc_obj_t *restrict objs)
static inline const char * hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char *name)
void hwloc_obj_add_info (hwloc_obj_t obj, const char *name, const char *value)

Detailed Description

Function Documentation

void hwloc_obj_add_info (hwloc_obj_tobj, const char *name, const char *value)

Add the given info name and value pair to the given object. The info is appended to the existing info array even if another key with the same name already exists.

The input strings are copied before being added in the object infos.

Note:

If value contains some non-printable characters, they will be dropped when exporting to XML, see hwloc_topology_export_xml().

int hwloc_obj_attr_snprintf (char *restrictstring, size_tsize, hwloc_obj_tobj, const char *restrictseparator, intverbose)

Stringify the attributes of a given topology object into a human-readable form. Attribute values are separated by separator.

Only the major attributes are printed in non-verbose mode.

If size is 0, string may safely be NULL.

Returns:

the number of character that were actually written if not truncating, or that would have been written (not including the ending \0).

int hwloc_obj_cpuset_snprintf (char *restrictstr, size_tsize, size_tnobj, const hwloc_obj_t *restrictobjs)

Stringify the cpuset containing a set of objects. If size is 0, string may safely be NULL.

Returns:

the number of character that were actually written if not truncating, or that would have been written (not including the ending \0).

static inline const char * hwloc_obj_get_info_by_name (hwloc_obj_tobj, const char *name) [static]

Search the given key name in object infos and return the corresponding value. If multiple keys match the given name, only the first one is returned.

Returns:

NULL if no such key exists.

int hwloc_obj_snprintf (char *restrictstring, size_tsize, hwloc_topology_ttopology, hwloc_obj_tobj, const char *restrictindexprefix, intverbose)

Stringify a given topology object into a human-readable form. Note:

This function is deprecated in favor of hwloc_obj_type_snprintf() and hwloc_obj_attr_snprintf() since it is not very flexible and only prints physical/OS indexes.

Fill string string up to size characters with the description of topology object obj in topology topology.

If verbose is set, a longer description is used. Otherwise a short description is used.

indexprefix is used to prefix the os_index attribute number of the object in the description. If NULL, the # character is used.

If size is 0, string may safely be NULL.

Returns:

the number of character that were actually written if not truncating, or that would have been written (not including the ending \0).

hwloc_obj_type_t hwloc_obj_type_of_string (const char *string)

Return an object type from the string. Returns:

-1 if unrecognized.

int hwloc_obj_type_snprintf (char *restrictstring, size_tsize, hwloc_obj_tobj, intverbose)

Stringify the type of a given topology object into a human-readable form. It differs from hwloc_obj_type_string() because it prints type attributes such as cache depth and type.

If size is 0, string may safely be NULL.

Returns:

the number of character that were actually written if not truncating, or that would have been written (not including the ending \0).

const char* hwloc_obj_type_string (hwloc_obj_type_ttype) const

Return a stringified topology object type.

Author

Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.

Mon Jul 30 2012 Version 1.5