Blame man/man3/PAPI_accum_counters.3

Packit Service a1973e
.TH "PAPI_accum_counters" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit Service a1973e
.ad l
Packit Service a1973e
.nh
Packit Service a1973e
.SH NAME
Packit Service a1973e
PAPI_accum_counters \- 
Packit Service a1973e
.PP
Packit Service a1973e
Accumulate and reset counters\&.  
Packit Service a1973e
Packit Service a1973e
.SH SYNOPSIS
Packit Service a1973e
.br
Packit Service a1973e
.PP
Packit Service a1973e
.SH "Detailed Description"
Packit Service a1973e
.PP 
Packit Service a1973e
Packit Service a1973e
.PP
Packit Service a1973e
.nf
Packit Service a1973e
@par C Interface:
Packit Service a1973e
\#include <papi.h> @n
Packit Service a1973e
int PAPI_accum_counters( long long *values, int array_len );
Packit Service a1973e
Packit Service a1973e
.fi
Packit Service a1973e
.PP
Packit Service a1973e
.PP
Packit Service a1973e
\fBParameters:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fI*values\fP an array to hold the counter values of the counting events 
Packit Service a1973e
.br
Packit Service a1973e
\fIarry_len\fP the number of items in the *events array
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBPrecondition:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
These calls assume an initialized PAPI library and a properly added event set\&.
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBPostcondition:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
The counters are reset and left running after the call\&.
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBReturn values:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fIPAPI_EINVAL\fP One or more of the arguments is invalid\&. 
Packit Service a1973e
.br
Packit Service a1973e
\fIPAPI_ESYS\fP A system or C library call failed inside PAPI, see the errno variable\&.
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_accum_counters()\fP adds the event counters into the array *values\&.
Packit Service a1973e
.PP
Packit Service a1973e
.PP
Packit Service a1973e
.nf
Packit Service a1973e
do_100events();
Packit Service a1973e
if ( PAPI_read_counters( values, num_hwcntrs ) != PAPI_OK )
Packit Service a1973e
    handlw_error(1);
Packit Service a1973e
// values[0] now equals 100 
Packit Service a1973e
do_100events();
Packit Service a1973e
if ( PAPI_accum_counters( values, num_hwcntrs ) != PAPI_OK )
Packit Service a1973e
    handle_error(1);
Packit Service a1973e
// values[0] now equals 200
Packit Service a1973e
values[0] = -100;
Packit Service a1973e
do_100events();
Packit Service a1973e
if ( PAPI_accum_counters(values, num_hwcntrs ) != PAPI_OK )
Packit Service a1973e
    handle_error();
Packit Service a1973e
// values[0] now equals 0
Packit Service a1973e
 *  
Packit Service a1973e
.fi
Packit Service a1973e
.PP
Packit Service a1973e
.PP
Packit Service a1973e
\fBSee Also:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fBPAPI_set_opt()\fP \fBPAPI_start_counters()\fP 
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
.SH "Author"
Packit Service a1973e
.PP 
Packit Service a1973e
Generated automatically by Doxygen for PAPI from the source code\&.