PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
PAPI_destroy_eventset Class Reference

Empty and destroy an EventSet. More...

Detailed Description

@par C Interface:
\#include <papi.h> @n
int PAPI_destroy_eventset( int * EventSet );

PAPI_destroy_eventset deallocates the memory associated with an empty PAPI EventSet.

Parameters
*EventSetA pointer to the integer handle for a PAPI event set as created by PAPI_create_eventset. The value pointed to by EventSet is then set to PAPI_NULL on success.
Return values
PAPI_EINVALOne 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_ENOEVSTThe EventSet specified does not exist.
PAPI_EISRUNThe EventSet is currently counting events.
PAPI_EBUGInternal error, send mail to ptool.nosp@m.s-pe.nosp@m.rfapi.nosp@m.@pto.nosp@m.ols.o.nosp@m.rg and complain.
Examples:
* // Free all memory and data structures, EventSet must be empty.
* if ( PAPI_destroy_eventset( &EventSet ) != PAPI_OK )
* handle_error( 1 );
*
Bug:
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 PAPI_profil @n
PAPI_create_eventset @n
PAPI_add_event @n
PAPI_stop

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