Blame man/man3/PAPI_stop.3

Packit 577717
.TH "PAPI_stop" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit 577717
.ad l
Packit 577717
.nh
Packit 577717
.SH NAME
Packit 577717
PAPI_stop \- 
Packit 577717
.PP
Packit 577717
Stop counting hardware events in an event set\&.  
Packit 577717
Packit 577717
.SH SYNOPSIS
Packit 577717
.br
Packit 577717
.PP
Packit 577717
.SH "Detailed Description"
Packit 577717
.PP 
Packit 577717
Packit 577717
.PP
Packit 577717
\fBC Interface:\fP
Packit 577717
.RS 4
Packit 577717
#include <\fBpapi\&.h\fP> 
Packit 577717
.br
Packit 577717
 int \fBPAPI_stop( int  EventSet, long long * values )\fP;
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBParameters:\fP
Packit 577717
.RS 4
Packit 577717
\fIEventSet\fP -- an integer handle for a PAPI event set as created by \fBPAPI_create_eventset\fP 
Packit 577717
.br
Packit 577717
\fIvalues\fP -- an array to hold the counter values of the counting events
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBReturn values:\fP
Packit 577717
.RS 4
Packit 577717
\fIPAPI_OK\fP 
Packit 577717
.br
Packit 577717
\fIPAPI_EINVAL\fP One or more of the arguments is invalid\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ESYS\fP A system or C library call failed inside PAPI, see the errno variable\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ENOEVST\fP The EventSet specified does not exist\&. 
Packit 577717
.br
Packit 577717
\fIPAPI_ENOTRUN\fP The EventSet is currently not running\&.
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBPAPI_stop\fP halts the counting of a previously defined event set and the counter values contained in that EventSet are copied into the values array Assumes an initialized PAPI library and a properly added event set\&.
Packit 577717
.PP
Packit 577717
\fBExample:\fP
Packit 577717
.RS 4
Packit 577717
Packit 577717
.PP
Packit 577717
.nf
Packit 577717
*  int EventSet = PAPI_NULL;
Packit 577717
*  long long values[2];
Packit 577717
*  int ret;
Packit 577717
*  
Packit 577717
*  ret = PAPI_create_eventset(&EventSet);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  
Packit 577717
*  // Add Total Instructions Executed to our EventSet
Packit 577717
*  ret = PAPI_add_event(EventSet, PAPI_TOT_INS);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  
Packit 577717
*  // Start counting
Packit 577717
*  ret = PAPI_start(EventSet);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  poorly_tuned_function();
Packit 577717
*  ret = PAPI_stop(EventSet, values);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  printf("%lld\\n",values[0]);
Packit 577717
*  
Packit 577717
Packit 577717
.fi
Packit 577717
.PP
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBSee Also:\fP
Packit 577717
.RS 4
Packit 577717
\fBPAPI_create_eventset\fP \fBPAPI_start\fP 
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
Packit 577717
Packit 577717
.SH "Author"
Packit 577717
.PP 
Packit 577717
Generated automatically by Doxygen for PAPI from the source code\&.