| 
 
     NAME
 
PAPI_cleanup_eventset, PAPI_destroy_eventset  -  empty and destroy an EventSet
  
CONTENTS
Synopsis 
Description 
Arguments 
Return Values 
Errors 
Examples 
Authors 
Bugs 
See Also 
 
     SYNOPSIS
C Interface 
#include <papi.h> 
int PAPI_cleanup_eventset(int EventSet); 
int PAPI_destroy_eventset(int *EventSet); 
 
Fortran Interface 
#include fpapi.h 
PAPIF_cleanup_eventset(C_INT EventSet, C_INT check) 
PAPIF_destroy_eventset(C_INT EventSet, C_INT check) 
 
  
     DESCRIPTION
PAPI_cleanup_eventset() removes all events from a PAPI event set.
PAPI_destroy_eventset() deallocates the memory associated with an empty PAPI event set.
 
  
     ARGUMENTS
EventSet --  an integer handle for a PAPI event set as created by
PAPI_create_eventset (3)
  
     RETURN VALUES
On success, these functions return PAPI_OK.
On error, a non-zero error code is returned.
 
  
     ERRORS
| 
PAPI_EINVAL  |  |   | 
One or more of the arguments is invalid. Attempting to
destroy a non-empty event set is one such case.
 |  
| 
PAPI_ENOEVST  |  |   | 
The EventSet specified does not exist.
 |  
| 
PAPI_EISRUN  |  |   | 
The EventSet is currently counting events.
 |  
| 
PAPI_EBUG  |  |   | 
Internal error, send mail to ptools-perfapi@ptools.org and complain.
 
  |  
|
   
     EXAMPLES
if (PAPI_stop(EventSet, values) != PAPI_OK)
  handle_error(1);
/* Remove all events in the eventset */
 
if (PAPI_cleanup_eventset(EventSet) != PAPI_OK)
  handle_error(1);
 
/* Free all memory and data structures, EventSet must be empty. */
 
if (PAPI_destroy_eventset(&EventSet) != PAPI_OK)
  handle_error(1);
  
  
     AUTHORS
The PAPI Team. See them at the PAPI Web Site:
http://icl.cs.utk.edu/projects/papi
  
     BUGS
These functions have no known bugs.
  
     SEE ALSO
PAPI_create_eventset (3), 
PAPI_query_event (3), 
PAPI_add_event (3), 
PAPI_start (3), 
PAPI_remove_event (3), 
PAPI_remove_events (3), 
PAPI_shutdown (3)
 
 
 | PAPI Programmers Reference |  PAPI_destroy_eventset (3) |  November, 2003 |    
 
 | 
 
 
 |