1PAPI_num_events(3) PAPI PAPI_num_events(3)
2
3
4
6 PAPI_num_events - return the number of events in an event set
7
9 C Interface
10 #include <papi.h>
11 int PAPI_num_events(int EventSet);
12 Fortran Interface
13 #include fpapi.h
14 PAPIF_num_events(C_INT EventSet, C_INT count)
15
16
18 PAPI_num_events() returns the number of preset events contained in an
19 event set. The event set should be created by PAPI_create_eventset(3).
20
21
23 EventSet -- an integer handle for a PAPI event set as created by
24 PAPI_create_eventset(3)
25
26 *count -- On output the variable contains the number of events in the
27 event set.
28
30 On success, this function returns the positive number of events in the
31 event set. On error, a non-zero error code is returned.
32
33
35 PAPI_EINVAL
36 The event count is zero; only if code is compiled with debug
37 enabled.
38
39 PAPI_ENOEVST
40 The EventSet specified does not exist.
41
42
43
44 EXAMPLES
45 /* Count the events in our EventSet */
46 printf("%d events found in EventSet.0, PAPI_num_events(EventSet));
47
48
49
51 This function has no known bugs.
52
53
55 PAPI_add_event(3),PAPI_create_eventset(3),PAPI(3),PAPIF(3)
56
57
58
59PAPI Programmer's Reference September, 2004 PAPI_num_events(3)