Go to the source code of this file.
◆ ERROR_RETURN
◆ MAX_TO_ADD
◆ NUM_ITERS
#define NUM_ITERS 10000000 |
◆ do_flops()
Definition at line 23 of file multiplex.c.
24{
28
31 return;
32}
static double a[MATRIX_SIZE][MATRIX_SIZE]
static double b[MATRIX_SIZE][MATRIX_SIZE]
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 142 of file multiplex.c.
143{
144
145 printf(
"Using %d iterations\n\n",
NUM_ITERS);
146 printf("Does PAPI_multiplex_init() handle lots of events?\n");
148 exit(0);
149}
◆ multiplex()
Definition at line 35 of file multiplex.c.
36{
41
42
45 {
46 printf("Library initialization error! \n");
47 exit(1);
48 }
49
50
54
58
59
63
64
65
66
67
68
69
71 {
75
77 {
78 printf(
"Adding %s\n", pset.
symbol);
79
83
85 printf(
"Added %s\n", pset.
symbol);
86 else
87 printf("Could not add %s due to resource limitation.\n",
89
91 {
93 break;
94 }
95 }
96 }
97
100 {
101 printf("Not enough memory available. \n");
102 exit(1);
103 }
104
107
109
113
114
118
119
121 {
125 printf(
"Event name: %s value: %lld \n", pset.
symbol,
values[
i]);
126 }
127
131
135
136
138
139 return (0);
140}
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Get the event's name and description info.
initialize the PAPI library.
list the events in an event set
Initialize multiplex support in the PAPI library.
Convert a standard event set to a multiplexed event set.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char events[MAX_EVENTS][BUFSIZ]
static long long values[NUM_EVENTS]
#define ERROR_RETURN(retval)
#define PAPI_MAX_PRESET_EVENTS
char symbol[PAPI_HUGE_STR_LEN]