8int main(
int argc,
char **argv )
17 region_name =
"do_flops";
21 printf(
"\nTesting high-level API: do_flops\n");
24 for (
i = 1;
i < 4; ++
i ) {
40 printf(
"\nTesting low-level API: do_flops\n");
45 char event_name1[]=
"appio:::READ_BYTES";
46 char event_name2[]=
"appio:::WRITE_BYTES";
56 if (!
quiet) printf(
"Couldn't add %s\n",event_name1);
57 test_skip(__FILE__,__LINE__,
"Couldn't add appio:::READ_BYTES",0);
62 if (!
quiet) printf(
"Couldn't add %s\n",event_name2);
63 test_skip(__FILE__,__LINE__,
"Couldn't add appio:::WRITE_BYTES",0);
81 printf(
"%s: %lld\n", event_name1,
values[0]);
82 printf(
"%s: %lld\n", event_name2,
values[1]);
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]
Return codes and api definitions.
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)