1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
.TH "PAPI_stop_counters" 3 "Mon Jun 30 2014" "Version 5.3.2.0" "PAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
PAPI_stop_counters \-
.PP
Stop counting hardware events and reset values to zero\&.
.SH SYNOPSIS
.br
.PP
.SH "Detailed Description"
.PP
.PP
.nf
@par C Interface:
\#include <papi.h> @n
int PAPI_stop_counters( long long *values, int array_len );
.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fI*values\fP an array where to put the counter values
.br
\fIarray_len\fP the number of items in the *values array
.RE
.PP
\fBPostcondition:\fP
.RS 4
After this function is called, the values are reset to zero\&.
.RE
.PP
\fBReturn values:\fP
.RS 4
\fIPAPI_EINVAL\fP One or more of the arguments is invalid\&.
.br
\fIPAPI_ENOTRUN\fP The EventSet is not started yet\&.
.br
\fIPAPI_ENOEVST\fP The EventSet has not been added yet\&.
.RE
.PP
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\&.
.PP
.PP
.nf
int Events[2] = { PAPI_TOT_CYC, PAPI_TOT_INS };
long long values[2];
if ( PAPI_start_counters( Events, 2 ) != PAPI_OK )
handle_error(1);
your_slow_code();
if ( PAPI_stop_counters( values, 2 ) != PAPI_OK )
handle_error(1);
*
.fi
.PP
.PP
\fBSee Also:\fP
.RS 4
\fBPAPI_read_counters()\fP \fBPAPI_start_counters()\fP \fBPAPI_set_opt()\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for PAPI from the source code\&.
|