PAPI_get_hardware_info(3)
πΈ NAME πΈ
PAPI_get_hardware_info β get information about the system hardware. This is the PAPI_get_hardware_info(3) page from the PAPI manual, and it's here to spill the hardware tea. No cap, that's literally the name and the job. ββ¨π
β¨ SYNOPSIS β¨
π Detailed Description π
Okay so, in C, the way that this function works is: it returns a pointer to a structure containing information about the hardware on which the program runs. In Fortran, the values of the structure are returned explicitly. It's giving "same info, different language delivery," and honestly? Lowkey obsessed. π
πΈ Return values πΈ
PAPI_EINVALβ One or more of the arguments is invalid. π
β οΈ Note β οΈ
β οΈ Note: The C structure contains detailed information about cache and TLB sizes. This information is not available from Fortran. π Periodt.
π§ͺ Examples: π§ͺ
const PAPI_hw_info_t *hwinfo = NULL;
if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)
exit(1);
if ((hwinfo = PAPI_get_hardware_info()) == NULL)
exit(1);
printf("%d CPUs at %f Mhz.\en",hwinfo->totalcpus,hwinfo->mhz);
π See also π
PAPI_hw_info_tPAPI_get_executable_infoPAPI_get_optPAPI_get_dmem_infoPAPI_library_init
π Author π
Generated automatically by Doxygen for PAPI from the source code. (The robots handled this part, and honestly? Iconic automation behavior. π€β¨)
π That's the whole page, bestie! Version 7.2.0.0 β’ Wed Jun 25 2025 19:30:48 β’ PAPI_get_hardware_info(3) signing off for the PAPI manual. ππ¦
π¦ 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