PAPIC:PAPI num hwctrs.3
(Redirected from PAPIC:PAPI num cmp hwctrs.3)
#include <papi.h> int PAPI_num_hwctrs(); int PAPI_num_cmp_hwctrs(int cidx );
#include fpapi.h PAPIF_num_hwctrs(C_INT num)
PAPI_num_hwctrs() returns the number of physical hardware counters present in the cpu. This is included to preserve backward compatability.
PAPI_num_cmp_hwctrs() returns the number of counters present in the specified component. By convention, component 0 is always the cpu. This count does not include any special purpose registers or other performance hardware. PAPI_library_init (3) must be called in order for this function to return anything greater than 0.
cidx -- An integer identifier for a component. By convention, component 0 is always the cpu component.
/* Query the cpu component for the number of counters. */ printf("%d hardware counters found.\n", PAPI_num_cmp_hwctrs(0));