1PAPI_create_eventset(3)              PAPI              PAPI_create_eventset(3)
2
3
4

NAME

6       PAPI_create_eventset - create an EventSet
7
8

SYNOPSIS

10       C Interface
11       #include <papi.h>
12       PAPI_create_eventset (int *EventSet);
13       Fortran Interface
14       #include fpapi.h
15       PAPIF_create_eventset(C_INT EventSet, C_INT check)
16
17

DESCRIPTION

19       PAPI_create_eventset()  creates  a new EventSet pointed to by EventSet,
20       which must be initialized to PAPI_NULL before calling this routine. The
21       user  may  then  add  hardware  events  to  the  event  set  by calling
22       PAPI_add_event(3) or similar routines.
23
24       NOTE: PAPI-C uses a late binding model to bind EventSets to components.
25       When  an EventSet is first created it is not bound to a component. This
26       will cause some API calls that modify  EventSet  options  to  fail.  An
27       EventSet   can   be   bound   to  a  component  explicitly  by  calling
28       PAPI_assign_eventset_component(3)    or    implicitly    by     calling
29       PAPI_add_event(3) or similar routines.
30
31

ARGUMENTS

33       EventSet  --  Address  of an integer location to store the new EventSet
34       handle
35
36

RETURN VALUES

38        On success, this function returns PAPI_OK.
39        On error, a non-zero error code is returned.
40
41

ERRORS

43       PAPI_EINVAL
44              The argument handle has not been initialized to PAPI_NULL or the
45              argument is a NULL pointer.
46
47       PAPI_ENOMEM
48              Insufficient memory to complete the operation.
49
50

EXAMPLES

52         int EventSet = PAPI_NULL;
53
54         if (PAPI_create_eventset(&EventSet) != PAPI_OK)
55           handle_error(1);
56
57         /* Add Total Instructions Executed to our EventSet */
58
59         if (PAPI_add_event(EventSet, PAPI_TOT_INS) != PAPI_OK)
60           handle_error(1);
61
62

BUGS

64       This function has no known bugs.
65
66

SEE ALSO

68       PAPI_destroy_eventset(3),  PAPI_cleanup_eventset(3), PAPI_add_event(3),
69       PAPI_assign_eventset_component(3)
70
71
72
73PAPI Programmer's Reference       April, 2007          PAPI_create_eventset(3)
Impressum