PAPI_enum_dev_type(3)

PAPI_enum_dev_type(3) πŸŽ€

okay so bestie, welcome to the PAPI manual β€” section 3, the developer-y one. This page is all about the function PAPI_enum_dev_type, and it's giving "gimme the next device type handle" energy. No cap. πŸ’…

NAME 🏷️

PAPI_enum_dev_type β€” returns handle of next device type. That's the whole name section, short and iconic. ✨

SYNOPSIS ✨

Detailed Description πŸ¦‹

This is the detailed bit, bestie. Buckle up. 🫢

Return values πŸ’€

  • return value: ENOCMP β€” component does not exist. Yes, it's spelled ENOCMP; I'm not fixing it, I'm just reporting the icon. πŸ’€
  • return value: EINVAL β€” end of device type list.

Parameters 🎚️

  • parameter: enum_modifier β€” device type modifier, used to filter out enumerated device types. That's the filter, periodt. 🧚

Example: πŸ“

           enum {
               PAPI_DEV_TYPE_ENUM__FIRST,
               PAPI_DEV_TYPE_ENUM__CPU,
               PAPI_DEV_TYPE_ENUM__CUDA,
               PAPI_DEV_TYPE_ENUM__ROCM,
               PAPI_DEV_TYPE_ENUM__ALL
           };

           void *handle;
           const char *vendor_name;
           int enum_modifier = PAPI_DEV_TYPE_ENUM__CPU | PAPI_DEV_TYPE_ENUM__CUDA;
           while (PAPI_OK == PAPI_enum_dev_type(enum_modifier, &handle)) {
               PAPI_get_dev_type_attr(handle, PAPI_DEV_TYPE_ATTR__CHAR_NAME, &vendor_name);
               ...
           }

And now the actual explanation, served exactly where the page puts it β€” right after the example. This function PAPI_enum_dev_type() is your access pass to every device type in the system. You hand it an enumerator modifier so users can enumerate only devices of a predefined type, and it returns an opaque handler that users can pass to other functions to query device type attributes. Slay. πŸ‘‘

See also πŸ‘€

  • PAPI_get_dev_type_attr
  • PAPI_get_dev_attr

Author πŸ‘‘

Generated automatically by Doxygen for PAPI from the source code.


That's the whole page, bestie. No facts left behind, no cap. 🫢 This cutie was generated automatically by Doxygen for PAPI from the source code, and the source/version/date check is PAPI, Version 7.2.0.0, Wed Jun 25 2025 19:30:48. xoxo, PAPI_enum_dev_type(3) πŸ’–