33main(
int argc,
char **argv )
65 if (!
quiet) printf(
"Trouble adding events\n");
70 printf(
"\n Incorrect usage of read and accum.\n" );
71 printf(
" Some cycles are counted twice\n" );
107 "(Reading stopped counters)\n" );
111 printf(
"\n Incorrect usage of read and accum.\n" );
112 printf(
" Another incorrect use\n" );
135 "(Intermediate counts...)\n" );
152 printf(
"\n Correct usage of read and accum.\n" );
153 printf(
" PAPI_reset and PAPI_accum used to skip counting\n" );
154 printf(
" a section of the code.\n" );
173 printf(
"%12s %12s (Counters reset)\n",
"",
"" );
184 printf(
"----------------------------------\n" );
185 printf(
"Verification: The last line in each experiment should be\n" );
186 printf(
"approximately twice the value of the first line.\n" );
188 (
"The third case illustrates one possible way to accomplish this.\n" );
Accumulate and reset counters in an EventSet.
add multiple PAPI presets or native hardware events to an event set
Create a new empty PAPI EventSet.
initialize the PAPI library.
Query if PAPI event exists.
Read hardware counters from an event set.
Reset the hardware event counts in an 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_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)