Blame man/man3/PAPI_stop_counters.3
Branch: a1973ebebf255f095424c18b2f06c020098a474a
Packit Service
a1973e
.TH "PAPI_stop_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_stop_counters \-
Packit Service
a1973e
.PP
Packit Service
a1973e
Stop counting hardware events and reset values to zero\&.
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_stop_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 where to put the counter values
Packit Service
a1973e
.br
Packit Service
a1973e
\fIarray_len\fP the number of items in the *values array
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
\fBPostcondition:\fP
Packit Service
a1973e
.RS 4
Packit Service
a1973e
After this function is called, the values are reset to zero\&.
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_ENOTRUN\fP The EventSet is not started yet\&.
Packit Service
a1973e
.br
Packit Service
a1973e
\fIPAPI_ENOEVST\fP The EventSet has not been added yet\&.
Packit Service
a1973e
.RE
Packit Service
a1973e
.PP
Packit Service
a1973e
The \fBPAPI_stop_counters()\fP function stops the counters and copies the counts into the *values array\&. The counters must have been started by a previous call to \fBPAPI_start_counters()\fP\&.
Packit Service
a1973e
.PP
Packit Service
a1973e
.PP
Packit Service
a1973e
.nf
Packit Service
a1973e
int Events[2] = { PAPI_TOT_CYC, PAPI_TOT_INS };
Packit Service
a1973e
long long values[2];
Packit Service
a1973e
if ( PAPI_start_counters( Events, 2 ) != PAPI_OK )
Packit Service
a1973e
handle_error(1);
Packit Service
a1973e
your_slow_code();
Packit Service
a1973e
if ( PAPI_stop_counters( values, 2 ) != PAPI_OK )
Packit Service
a1973e
handle_error(1);
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_read_counters()\fP \fBPAPI_start_counters()\fP \fBPAPI_set_opt()\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\&.