55 unsigned port,
unsigned device)
57 unsigned x = (unsigned) -1, y = (
unsigned) -1;
62 && sscanf(osdev->
name,
":%u.%u", &x, &y) == 2
63 && port == x && device == y)
92 && !strcmp(name, osdev->
name))
110 static __hwloc_inline
int 113 unsigned *port,
unsigned *device)
115 unsigned x = -1, y = -1;
117 && sscanf(osdev->
name,
":%u.%u", &x, &y) == 2) {
Operating system GPU device. For instance ":0.0" for a GL display, "card0" for a Linux DRM device...
Definition: hwloc.h:287
static hwloc_obj_t hwloc_gl_get_display_osdev_by_name(hwloc_topology_t topology, const char *name)
Get the hwloc OS device object corresponding to the OpenGL display given by name. ...
Definition: gl.h:85
char * name
Object-specific name if any. Mostly used for identifying OS devices and Misc objects where a name str...
Definition: hwloc.h:366
static hwloc_obj_t hwloc_get_next_osdev(hwloc_topology_t topology, hwloc_obj_t prev)
Get the next OS device in the system.
Definition: helper.h:1252
union hwloc_obj_attr_u * attr
Object type-specific Attributes, may be NULL if no attribute value was found.
Definition: hwloc.h:373
struct hwloc_obj_attr_u::hwloc_osdev_attr_s osdev
static int hwloc_gl_get_display_by_osdev(hwloc_topology_t topology, hwloc_obj_t osdev, unsigned *port, unsigned *device)
Get the OpenGL display port and device corresponding to the given hwloc OS object.
Definition: gl.h:111
Structure of a topology object.
Definition: hwloc.h:358
static hwloc_obj_t hwloc_gl_get_display_osdev_by_port_device(hwloc_topology_t topology, unsigned port, unsigned device)
Get the hwloc OS device object corresponding to the OpenGL display given by port and device index...
Definition: gl.h:54
hwloc_obj_osdev_type_t type
Definition: hwloc.h:567
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:633