Components and Plugins: Discovery components and backends

## Data Structures

struct | hwloc_disc_component
struct | hwloc_disc_status
struct | hwloc_backend

## Typedefs

typedef enum hwloc_disc_phase_e | hwloc_disc_phase_t

## Enumerations

enum | hwloc_disc_phase_e { HWLOC_DISC_PHASE_GLOBAL , HWLOC_DISC_PHASE_CPU , HWLOC_DISC_PHASE_MEMORY , HWLOC_DISC_PHASE_PCI , HWLOC_DISC_PHASE_IO , HWLOC_DISC_PHASE_MISC , HWLOC_DISC_PHASE_ANNOTATE , HWLOC_DISC_PHASE_TWEAK }
enum | hwloc_disc_status_flag_e { HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES }

## Functions

struct hwloc_backend * | hwloc_backend_alloc (struct hwloc_topology *topology, struct hwloc_disc_component *component)
int | hwloc_backend_enable (struct hwloc_backend *backend)

## Detailed Description

Note
  These structures and functions may change when HWLOC_COMPONENT_ABI is modified.

## Typedef Documentation

## hwloc_disc_phase_t

typedef enum hwloc_disc_phase_e hwloc_disc_phase_t

Discovery phase.

## Enumeration Type Documentation

## hwloc_disc_phase_e

enum hwloc_disc_phase_e

Discovery phase.

Enumerator
HWLOC_DISC_PHASE_GLOBAL | xml or synthetic, platform-specific components such as bgq. Discovers everything including CPU, memory, I/O and everything else. A component with a Global phase usually excludes all other phases.
HWLOC_DISC_PHASE_CPU | CPU discovery.
HWLOC_DISC_PHASE_MEMORY | Attach memory to existing CPU objects.
HWLOC_DISC_PHASE_PCI | Attach PCI devices and bridges to existing CPU objects.
HWLOC_DISC_PHASE_IO | I/O discovery that requires PCI devices (OS devices such as OpenCL, CUDA, etc.).
HWLOC_DISC_PHASE_MISC | Misc objects that gets added below anything else.
HWLOC_DISC_PHASE_ANNOTATE | Annotating existing objects, adding distances, etc.
HWLOC_DISC_PHASE_TWEAK | Final tweaks to a ready-to-use topology. This phase runs once the topology is loaded, before it is returned to the topology. Hence it may only use the main hwloc API for modifying the topology, for instance by restricting it, adding info attributes, etc.

## hwloc_disc_status_flag_e

enum hwloc_disc_status_flag_e

Discovery status flags.

Enumerator
HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES | The sets of allowed resources were already retrieved.

## Function Documentation

## hwloc_backend_alloc()

struct hwloc_backend * hwloc_backend_alloc | ( | struct hwloc_topology * | topology,
|  | struct hwloc_disc_component * | component )

Allocate a backend structure, set good default values, initialize backend->component and topology, etc. The caller will then modify whatever needed, and call hwloc_backend_enable().

## hwloc_backend_enable()

int hwloc_backend_enable | ( | struct hwloc_backend * | backend | ) |

Enable a previously allocated and setup backend.