Blame man/man3/PAPI_state.3

Packit 577717
.TH "PAPI_state" 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_state \- 
Packit 577717
.PP
Packit 577717
Return the counting state of an EventSet\&.  
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_state( int  EventSet, int * status )\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
\fIstatus\fP -- an integer containing a boolean combination of one or more of the following nonzero constants as defined in the PAPI header file \fBpapi\&.h\fP: 
Packit 577717
.PD 0
Packit 577717
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_STOPPED -- EventSet is stopped 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_RUNNING -- EventSet is running 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_PAUSED -- EventSet temporarily disabled by the library 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_NOT_INIT -- EventSet defined, but not initialized 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_OVERFLOWING -- EventSet has overflowing enabled 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_PROFILING -- EventSet has profiling enabled 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_MULTIPLEXING -- EventSet has multiplexing enabled 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_ACCUMULATING -- reserved for future use 
Packit 577717
.IP "\(bu" 2
Packit 577717
PAPI_HWPROFILING -- reserved for future use  
Packit 577717
   
Packit 577717
.PP
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_ENOEVST\fP The EventSet specified does not exist\&.  
Packit 577717
   
Packit 577717
.RE
Packit 577717
.PP
Packit 577717
\fBPAPI_state()\fP returns the counting state of the specified event set\&.  
Packit 577717
   
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
*  int status = 0;
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_state(EventSet, &status);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  printf("State is now %d\n",status);
Packit 577717
*  ret = PAPI_start(EventSet);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  ret = PAPI_state(EventSet, &status);
Packit 577717
*  if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*  printf("State is now %d\n",status);
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_stop\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\&.