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 spelledENOCMP; 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_attrPAPI_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) π
π¦ where this page comes from
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- ubuntu resolute: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms