9{
12 char* region_name;
13
14
16
17 region_name = "do_flops";
18
19
21 printf("\nTesting high-level API: do_flops\n");
22 }
23
24 for (
i = 1;
i < 4; ++
i ) {
25
29 }
30
32
36 }
37 }
38
40 printf("\nTesting low-level API: do_flops\n");
41 }
42
45 char event_name1[]="appio:::READ_BYTES";
46 char event_name2[]="appio:::WRITE_BYTES";
47
48
52 }
53
56 if (!
quiet) printf(
"Couldn't add %s\n",event_name1);
57 test_skip(__FILE__,__LINE__,
"Couldn't add appio:::READ_BYTES",0);
58 }
59
62 if (!
quiet) printf(
"Couldn't add %s\n",event_name2);
63 test_skip(__FILE__,__LINE__,
"Couldn't add appio:::WRITE_BYTES",0);
64 }
65
66
70 }
71
73
74
78 }
79
81 printf(
"%s: %lld\n", event_name1,
values[0]);
82 printf(
"%s: %lld\n", event_name2,
values[1]);
83 }
84
85
88
90
91 return 0;
92}
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
Read performance events at the beginning of a region.
Read performance events at the end of a region and store the difference to the corresponding beginnin...
removes a named hardware event from a PAPI event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_hl_pass(const char *filename)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)