PAPI_cleanup_eventset Class Reference

Empty and destroy an EventSet. More...

Detailed Description

C Interface:
#include <papi.h>
int PAPI_cleanup_eventset( int EventSet );

PAPI_cleanup_eventset removes all events from a PAPI event set and turns off profiling and overflow for all events in the EventSet. This can not be called if the EventSet is not stopped.

EventSet An integer handle for a PAPI event set as created by PAPI_create_eventset.
Return values:
PAPI_EINVAL One or more of the arguments is invalid. Attempting to destroy a non-empty event set or passing in a null pointer to be destroyed.
PAPI_ENOEVST The EventSet specified does not exist.
PAPI_EISRUN The EventSet is currently counting events.
PAPI_EBUG Internal error, send mail to and complain.
    // Remove all events in the eventset
    if ( PAPI_cleanup_eventset( EventSet ) != PAPI_OK )
    handle_error( 1 );
If the user has set profile on an event with the call, then when destroying the EventSet the memory allocated by will not be freed. The user should turn off profiling on the Events before destroying the EventSet to prevent this behavior.
See also:

The documentation for this class was generated from the following file:

Generated on 17 Nov 2016 for PAPI by  doxygen 1.6.1