.TH "PAPI_stop_counters" 3 "Fri Feb 22 2019" "Version 5.7.0.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 @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\&.