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

Read performance events at the beginning of a region. More...

Detailed Description

C Interface:
#include <papi.h>
int PAPI_hl_region_begin( const char* region );
Parameters
region– a unique region name
Return values
PAPI_OK
PAPI_ENOTRUN– EventSet is currently not running or could not determined.
PAPI_ESYS– A system or C library call failed inside PAPI, see the errno variable.
PAPI_EMISC– PAPI has been deactivated due to previous errors.
PAPI_ENOMEM– Insufficient memory.

PAPI_hl_region_begin reads performance events and stores them internally at the beginning of an instrumented code region. If not specified via the environment variable PAPI_EVENTS, default events are used. The first call sets all counters implicitly to zero and starts counting. Note that if PAPI_EVENTS is not set or cannot be interpreted, default performance events are recorded.

Example:
export PAPI_EVENTS="PAPI_TOT_INS,PAPI_TOT_CYC"
int retval;
retval = PAPI_hl_region_begin("computation");
if ( retval != PAPI_OK )
handle_error(1);
//Do some computation here
retval = PAPI_hl_region_end("computation");
if ( retval != PAPI_OK )
handle_error(1);
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...
#define PAPI_OK
Definition: f90papi.h:73
int retval
Definition: zero_fork.c:53
See also
PAPI_hl_read
PAPI_hl_region_end
PAPI_hl_stop

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