CInterface:
#include <papi.h>
int PAPI_hl_read(constchar*region);
Parametersregion -- a unique region name corresponding to PAPI_hl_region_beginReturnvaluesPAPI_OKPAPI_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_read reads performance events inside of a region and stores the difference to the corresponding
beginning of the region.
Assumes that PAPI_hl_region_begin was called before.
Example:
int retval;
retval = PAPI_hl_region_begin("computation");
if ( retval != PAPI_OK )
handle_error(1);
//Do some computation here
retval = PAPI_hl_read("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);
SeealsoPAPI_hl_region_beginPAPI_hl_region_endPAPI_hl_stop