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_t
  • PAPI_get_executable_info
  • PAPI_get_opt
  • PAPI_get_dmem_info
  • PAPI_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. πŸŽ€πŸ¦‹