1PAPI_set_multiplex(3) PAPI PAPI_set_multiplex(3)
2
3
4
6 PAPI_get_multiplex - get the multiplexing status of specified event set
7 PAPI_set_multiplex - convert a standard event set to a multiplexed
8 event set
9
10
12 C Interface
13 #include <papi.h>
14 int PAPI_get_multiplex(int EventSet);
15 int PAPI_set_multiplex(int EventSet);
16 Fortran Interface
17 #include fpapi.h
18 PAPIF_get_multiplex(C_INT EventSet, C_INT check)
19 PAPIF_set_multiplex(C_INT EventSet, C_INT check)
20
21
23 PAPI_get_multiplex tests the state of the PAPI_MULTIPLEXING flag in the
24 specified event set, returning TRUE if a PAPI event set is multiplexed,
25 or FALSE if not.
26
27 PAPI_set_multiplex converts a standard PAPI event set created by a call
28 to PAPI_create_eventset() into an event set capable of handling multi‐
29 plexed events. This must be done after calling PAPI_multiplex_init() ,
30 but prior to calling PAPI_start(). Events can be added to an event set
31 either before or after converting it into a multiplexed set, but the
32 conversion must be done prior to using it as a multiplexed set.
33
34
36 EventSet -- an integer handle for a PAPI event set as created by
37 PAPI_create_eventset(3)
38
39
41 PAPI_get_multiplex returns either TRUE (positive non-zero) if multi‐
42 plexing is enabled for this event set, FALSE (zero) if multiplexing is
43 not enabled, or PAPI_ENOEVST if the specified event set cannot be
44 found.
45
46 On success, PAPI_get_multiplex returns PAPI_OK. On error, a non-zero
47 error code is returned, as described below.
48
49
51 PAPI_EINVAL
52 One or more of the arguments is invalid, or the EventSet is
53 already multiplexed.
54
55 PAPI_ENOEVST
56 The EventSet specified does not exist.
57
58 PAPI_EISRUN
59 The EventSet is currently counting events.
60
61 PAPI_ENOMEM
62 Insufficient memory to complete the operation.
63
64
66 retval = PAPI_get_multiplex(EventSet);
67 if (retval > 0) printf("This event set is ready for multiplexing0")
68 if (retval == 0) printf("This event set is not enabled for multiplexing0")
69 if (retval < 0) handle_error(retval);
70
71 retval = PAPI_set_multiplex(EventSet);
72 if ((retval == PAPI_EINVAL) && (PAPI_get_multiplex(EventSet) > 0))
73 printf("This event set already has multiplexing enabled0);
74 else if (retval != PAPI_OK) handle_error(retval);
75
76
78 This function has no known bugs.
79
80
82 PAPI_multiplex_init(3),PAPI_set_opt(3),PAPI_create_eventset(3)
83
84
85
86PAPI Programmer's Reference September, 2004 PAPI_set_multiplex(3)