Open MPI logo

Portable Hardware Locality (hwloc) Documentation: v1.7.1

  |   Home   |   Support   |   FAQ   |  
Core functions to be used by components


typedef void(* hwloc_report_error_t )(const char *msg, int line)


struct hwloc_objhwloc_insert_object_by_cpuset (struct hwloc_topology *topology, hwloc_obj_t obj)
void hwloc_report_os_error (const char *msg, int line)
int hwloc_hide_errors (void)
struct hwloc_objhwloc__insert_object_by_cpuset (struct hwloc_topology *topology, hwloc_obj_t obj, hwloc_report_error_t report_error)
void hwloc_insert_object_by_parent (struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj)
static inline struct
hwloc_alloc_setup_object (hwloc_obj_type_t type, signed os_index)

Detailed Description

Typedef Documentation

typedef void(* hwloc_report_error_t)(const char *msg, int line)

Type of error callbacks during object insertion.

Function Documentation

struct hwloc_obj* hwloc__insert_object_by_cpuset ( struct hwloc_topology *  topology,
hwloc_obj_t  obj,
hwloc_report_error_t  report_error 

Add an object to the topology and specify which error callback to use.

Aside from the error callback selection, this function is identical to hwloc_insert_object_by_cpuset()

static inline struct hwloc_obj* hwloc_alloc_setup_object ( hwloc_obj_type_t  type,
signed  os_index 

Allocate and initialize an object of the given type and physical index.

int hwloc_hide_errors ( void  )

Check whether insertion errors are hidden.

struct hwloc_obj* hwloc_insert_object_by_cpuset ( struct hwloc_topology *  topology,
hwloc_obj_t  obj 

Add an object to the topology.

It is sorted along the tree of other objects according to the inclusion of cpusets, to eventually be added as a child of the smallest object including this object.

If the cpuset is empty, the type of the object (and maybe some attributes) must be enough to find where to insert the object. This is especially true for NUMA nodes with memory and no CPUs.

The given object should not have children.

This shall only be called before levels are built.

In case of error, hwloc_report_os_error() is called.

Returns the object on success. Returns NULL and frees obj on error. Returns another object and frees obj if it was merged with an identical pre-existing object.

void hwloc_insert_object_by_parent ( struct hwloc_topology *  topology,
hwloc_obj_t  parent,
hwloc_obj_t  obj 

Insert an object somewhere in the topology.

It is added as the last child of the given parent. The cpuset is completely ignored, so strange objects such as I/O devices should preferably be inserted with this.

The given object may have children.

Remember to call topology_connect() afterwards to fix handy pointers.

void hwloc_report_os_error ( const char *  msg,
int  line 

Report an insertion error from a backend.