Hardware Locality (hwloc)  master-20230831.0905.git364652f8b
Data Structures | Macros | Typedefs | Enumerations | Functions
Components and Plugins: Discovery backends

Data Structures

struct  hwloc_disc_status
 
struct  hwloc_backend
 

Macros

#define HWLOC_BACKEND_PRIVATE_DATA(_backend)   (void*)(((char*)(_backend)) + sizeof(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_backendhwloc_backend_alloc (struct hwloc_topology *topology, struct hwloc_disc_component *component, unsigned long private_data_size)
 
int hwloc_backend_enable (struct hwloc_backend *backend)
 

Detailed Description

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

Macro Definition Documentation

◆ HWLOC_BACKEND_PRIVATE_DATA

#define HWLOC_BACKEND_PRIVATE_DATA (   _backend)    (void*)(((char*)(_backend)) + sizeof(struct hwloc_backend))

Return the private data pointer at the end of a backend structure.

Typedef Documentation

◆ hwloc_disc_phase_t

Discovery phase.

Enumeration Type Documentation

◆ hwloc_disc_phase_e

Discovery phase.

Enumerator
HWLOC_DISC_PHASE_GLOBAL 

xml or synthetic, platform-specific components. 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

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,
unsigned long  private_data_size 
)

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(). If private_data_size is positive, additional space is allocated at the end of the structure for storing backend private data. That space may be obtained with HWLOC_BACKEND_PRIVATE_DATA() and may be freely modified by the backend.

◆ hwloc_backend_enable()

int hwloc_backend_enable ( struct hwloc_backend backend)

Enable a previously allocated and setup backend.