PAPI_read_counters
Read and reset counters.
- Provided by: libpapi-dev (Version: 5.4.3-2)
- Source: papi
- Report a bug
Read and reset counters.
@par C Interface: int PAPI_read_counters( long long *values, int array_len );
Parameters:
Precondition:
Postcondition:
Return values:
PAPI_read_counters() copies the event counters into the array *values.
do_100events();
if ( PAPI_read_counters( values, num_hwcntrs ) != PAPI_OK )
handlw_error(1);
// values[0] now equals 100
do_100events();
if ( PAPI_accum_counters( values, num_hwcntrs ) != PAPI_OK )
handle_error(1);
// values[0] now equals 200
values[0] = -100;
do_100events();
if ( PAPI_accum_counters(values, num_hwcntrs ) != PAPI_OK )
handle_error();
// values[0] now equals 0
*
See Also:
Fortran Interface:
See Also:
Generated automatically by Doxygen for PAPI from the source code.