1PAPI_assign_eventset_component(3)    PAPI    PAPI_assign_eventset_component(3)
2
3
4

NAME

6       PAPI_assign_eventset_component  - assign a component index to an exist‐
7       ing but empty EventSet
8
9

SYNOPSIS

11       C Interface
12       #include <papi.h>
13       PAPI_assign_eventset_component (int EventSet",intcidx);"
14
15

DESCRIPTION

17       PAPI_assign_eventset_component() assigns a specific component index, as
18       specified  by  cidx,  to  a  new  EventSet  identified  by EventSet, as
19       obtained from PAPI_create_eventset(3).  EventSets are ordinarily  auto‐
20       matically bound to components when the first event is added.  This rou‐
21       tine is useful to explicitly bind an EventSet  to  a  component  before
22       setting component related options.
23
24

ARGUMENTS

26       EventSet -- An integer identifier for an existing EventSet
27
28       cidx -- An integer identifier for a component. By convention, component
29       0 is always the cpu component.
30
31

RETURN VALUES

33        On success, this function returns PAPI_OK.
34        On error, a non-zero error code is returned.
35
36

ERRORS

38       PAPI_ENOCMP
39              The argument cidx is not a valid component.
40
41       PAPI_ENOEVST
42              The EventSet doesn't exist.
43
44       PAPI_ENOMEM
45              Insufficient memory to complete the operation.
46
47

EXAMPLES

49         int EventSet = PAPI_NULL;
50
51         if (PAPI_create_eventset(&EventSet) != PAPI_OK)
52           handle_error(1);
53
54         /* Bind our EventSet to the cpu component */
55
56         if (PAPI_assign_eventset_component(EventSet, 0) != PAPI_OK)
57           handle_error(1);
58
59         /* Convert our EventSet to multiplexing */
60
61         if (PAPI_set_multiplex(EventSet) != PAPI_OK)
62           handle_error(1);
63
64

BUGS

66       This function has no known bugs.
67
68

SEE ALSO

70       PAPI_create_eventset(3),   PAPI_add_event(3),    PAPI_set_multiplex(3),
71       PAPI_set_opt(3)
72
73
74
75PAPI Programmer's Reference       April, 2007PAPI_assign_eventset_component(3)
Impressum