PAPI 7.1.0.0
Loading...
Searching...
No Matches
PAPI_reset Class Reference

Reset the hardware event counts in an event set. More...

Detailed Description

C Prototype:
#include <papi.h>
int PAPI_reset( int EventSet );
Parameters
EventSetan integer handle for a PAPI event set as created by PAPI_create_eventset
Return values
PAPI_OK
PAPI_ESYSA system or C library call failed inside PAPI, see the errno variable.
PAPI_ENOEVSTThe EventSet specified does not exist.

PAPI_reset() zeroes the values of the counters contained in EventSet. This call assumes an initialized PAPI library and a properly added event set

Example:
int Events[] = {PAPI_TOT_INS, PAPI_FP_OPS};
int ret;
// Create an empty EventSet
if (ret != PAPI_OK) handle_error(ret);
// Add two events to our EventSet
ret = PAPI_add_events(EventSet, Events, 2);
if (ret != PAPI_OK) handle_error(ret);
// Start counting
if (ret != PAPI_OK) handle_error(ret);
// Stop counting, ignore values
ret = PAPI_stop(EventSet, NULL);
if (ret != PAPI_OK) handle_error(ret);
// reset the counters in this EventSet
if (ret != PAPI_OK) handle_error(ret);
add multiple PAPI presets or native hardware events to an event set
Create a new empty PAPI EventSet.
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.
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_NULL
Definition: f90papi.h:78
#define PAPI_FP_OPS
Definition: f90papi.h:319
#define PAPI_TOT_INS
Definition: f90papi.h:317
static int EventSet
Definition: init_fini.c:8
See also
PAPI_create_eventset

The documentation for this class was generated from the following file: