Blame man/man3/PAPI_remove_named_event.3

Packit 577717
.TH "PAPI_remove_named_event" 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_remove_named_event \- 
Packit 577717
.PP
Packit 577717
removes a named hardware event from a PAPI 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
.nf
Packit 577717
A hardware event can be either a PAPI Preset or a native hardware 
Packit 577717
event code.  For a list of PAPI preset events, see PAPI_presets or 
Packit 577717
run the papi_avail utility in the PAPI distribution.  PAPI Presets 
Packit 577717
can be passed to PAPI_query_event to see if they exist on the 
Packit 577717
underlying architecture.  For a list of native events available on 
Packit 577717
the current platform, run papi_native_avail in the PAPI distribution. 
Packit 577717
Packit 577717
@par C Interface:
Packit 577717
\#include <papi.h> @n
Packit 577717
int PAPI_remove_named_event( int  EventSet, const char *EventName );
Packit 577717
Packit 577717
@param[in] EventSet
Packit 577717
   -- an integer handle for a PAPI event set as created 
Packit 577717
         by PAPI_create_eventset
Packit 577717
@param[in] EventName
Packit 577717
   -- a defined event such as PAPI_TOT_INS or a native event. 
Packit 577717
Packit 577717
@retval PAPI_OK 
Packit 577717
    Everything worked.
Packit 577717
@retval PAPI_EINVAL 
Packit 577717
    One or more of the arguments is invalid.
Packit 577717
@retval PAPI_ENOINIT 
Packit 577717
    The PAPI library has not been initialized.
Packit 577717
@retval PAPI_ENOEVST 
Packit 577717
    The EventSet specified does not exist.
Packit 577717
@retval PAPI_EISRUN 
Packit 577717
    The EventSet is currently counting events.
Packit 577717
@retval PAPI_ECNFLCT 
Packit 577717
    The underlying counter hardware can not count this 
Packit 577717
           event and other events in the EventSet simultaneously.
Packit 577717
@retval PAPI_ENOEVNT 
Packit 577717
    The PAPI preset is not available on the underlying hardware. 
Packit 577717
Packit 577717
@par Example:
Packit 577717
Packit 577717
.fi
Packit 577717
.PP
Packit 577717
 
Packit 577717
.PP
Packit 577717
.nf
Packit 577717
*   char EventName = "PAPI_TOT_INS";
Packit 577717
*   int EventSet = PAPI_NULL;
Packit 577717
*   int ret;
Packit 577717
*
Packit 577717
*   // Create an empty EventSet
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_named_event(EventSet, EventName);
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
*
Packit 577717
*   // Stop counting, ignore values
Packit 577717
*   ret = PAPI_stop(EventSet, NULL);
Packit 577717
*   if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*
Packit 577717
*   // Remove event
Packit 577717
*   ret = PAPI_remove_named_event(EventSet, EventName);
Packit 577717
*   if (ret != PAPI_OK) handle_error(ret);
Packit 577717
*   
Packit 577717
Packit 577717
.fi
Packit 577717
.PP
Packit 577717
.PP
Packit 577717
\fBSee Also:\fP
Packit 577717
.RS 4
Packit 577717
\fBPAPI_remove_event\fP 
Packit 577717
.br
Packit 577717
 \fBPAPI_query_named_event\fP 
Packit 577717
.br
Packit 577717
 \fBPAPI_add_named_event\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\&.