1PAPI_num_hwctrs(3)                   PAPI                   PAPI_num_hwctrs(3)
2
3
4

NAME

6        PAPI_num_hwctrs - return the number of hardware counters on the cpu
7        PAPI_num_cmp_hwctrs  -  return the number of hardware counters for the
8       specified component
9
10

SYNOPSIS

12       C Interface
13       #include <papi.h>
14       int PAPI_num_hwctrs();
15       int PAPI_num_cmp_hwctrs(int cidx);
16       Fortran Interface
17       #include fpapi.h
18       PAPIF_num_hwctrs(C_INT num)
19
20

DESCRIPTION

22       PAPI_num_hwctrs() returns the  number  of  physical  hardware  counters
23       present  in the cpu.  This is included to preserve backward compatabil‐
24       ity.
25
26       PAPI_num_cmp_hwctrs() returns the number of  counters  present  in  the
27       specified  component.   By  convention,  component 0 is always the cpu.
28       This count does not include any special purpose registers or other per‐
29       formance  hardware.   PAPI_library_init(3)  must be called in order for
30       this function to return anything greater than 0.
31
32

ARGUMENTS

34       cidx -- An integer identifier for a component. By convention, component
35       0 is always the cpu component.
36
37

RETURN VALUES

39       On success, this function returns a value greater than zero.
40
41       A zero result usually means the library has not been initialized.
42
43

EXAMPLES

45       /* Query the cpu component for the number of counters. */
46       printf("%d hardware counters found.0, PAPI_num_cmp_hwctrs(0));
47
48

BUGS

50       None.
51
52

SEE ALSO

54       PAPI_init_library(3), PAPI(3),PAPI_F(3)
55
56
57
58PAPI Programmer's Reference       April, 2007               PAPI_num_hwctrs(3)
Impressum