PAPI3:PAPI num hwctrs.3
From PAPIDocs
Jump to: navigation, search


NAME

  • PAPI_num_hwctrs - return the number of hardware counters

Synopsis

C Interface

#include <papi.h>
int PAPI_num_hwctrs();

Fortran Interface

#include fpapi.h
PAPIF_num_hwctrs(C_INT  num)

Description

PAPI_num_hwctrs() returns the number of physical hardware counters present in the processor. This count does not include any special purpose registers or performance hardware. PAPI_library_init (3) must be called in order for this function to return anything greater than 0.

Arguments

This function takes no arguments.

Examples

/* Query the substrate for our resources. */
printf("%d hardware counters found.\n", PAPI_num_hwctrs());

Bugs

None.

See Also

PAPI(3), PAPIF(3), PAPI_library_init(3)