Download PAPI USER'S GUIDE

Transcript
PAPI User’s Guide
Version 3.5.0
/* Start counting */
if (PAPI_state(EventSet, &status) != PAPI_OK)
handle_error(1);
printf("State is now %d\n", status);
if (PAPI_start(EventSet) != PAPI_OK)
handle_error(1);
if (PAPI_state(EventSet, &status) != PAPI_OK)
handle_error(1);
printf("State is now %d\n", status);
}
OUTPUT:
State is now 1
State is now 2
On success, this function returns PAPI_OK and on error, a non-zero error code is
returned.
- 32 -