GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HWLOCALITY_OBJECT_STRINGS (3)

NAME

hwlocality_object_strings - Manipulating Object Type, Sets and Attributes as Strings

    Functions

    const char * hwloc_obj_type_string (hwloc_obj_type_t type)    
int hwloc_obj_type_sscanf (const char *string, hwloc_obj_type_t *typep, int *depthattrp, void *typeattrp, size_t typeattrsize)    
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_cpuset_snprintf (char *restrict str, size_t size, size_t nobj, const hwloc_obj_t *restrict objs)    
static 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)

CONTENTS

Detailed Description

Function Documentation

void hwloc_obj_add_info (hwloc_obj_t obj, 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:

This function may be used to enforce object colors in the lstopo graphical output by using ’lstopoStyle’ as a name and ’Background=#rrggbb’ as a value. See CUSTOM COLORS in the lstopo(1) manpage for details.

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 *restrict string, size_t size, hwloc_obj_t obj, const char *restrict separator, int verbose)

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 *restrict str, size_t size, size_t nobj, const hwloc_obj_t *restrict objs)

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 const char* hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char * name) [inline], [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_type_snprintf (char *restrict string, size_t size, hwloc_obj_t obj, int verbose)

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).

int hwloc_obj_type_sscanf (const char * string, hwloc_obj_type_t * typep, int * depthattrp, void * typeattrp, size_t typeattrsize)

Return an object type and attributes from a type string. Convert strings such as ’Package’ or ’Cache’ into the corresponding types. Matching is case-insensitive, and only the first letters are actually required to match.

Types that have specific attributes, for instance caches and groups, may be returned in depthattrp and typeattrp. They are ignored when these pointers are NULL.

For instance ’L2i’ or ’L2iCache’ would return type HWLOC_OBJ_CACHE in typep, 2 in depthattrp, and HWLOC_OBJ_CACHE_TYPE_INSTRUCTION in typeattrp (this last pointer should point to a hwloc_obj_cache_type_t). ’Group3’ would return type HWLOC_OBJ_GROUP type and 3 in depthattrp. Attributes that are not specified in the string (for instance ’Group’ without a depth, or ’L2Cache’ without a cache type) are set to -1.

typeattrp is only filled if the size specified in typeattrsize is large enough. It is currently only used for caches, and the required size is at least the size of hwloc_obj_cache_type_t.

Returns:

0 if a type was correctly identified, otherwise -1.

Note:

This is an extended version of the now deprecated hwloc_obj_type_of_string()

const char* hwloc_obj_type_string (hwloc_obj_type_t type)

Return a stringified topology object type.

Author

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

Search for    or go to Top of page |  Section 3 |  Main Index


Version 1.11.1 HWLOCALITY_OBJECT_STRINGS (3) Thu Oct 15 2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.