NAME

PAPI_cleanup_eventset, PAPI_destroy_eventset - empty and destroy an EventSet

CONTENTS

Synopsis
Description
Arguments
Return Values
Errors
Examples
Author
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 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);

AUTHOR

Philip J. Mucci <mucci@cs.utk.edu>

BUGS

These functions have no known bugs.

SEE ALSO

PAPI_create_eventset (3), PAPI_query_all_events_verbose (3), PAPI_query_event_verbose (3), PAPI_query_event (3), PAPI_add_event (3), PAPI_start (3), PAPI_rem_event (3), PAPI_rem_events (3), PAPI_shutdown (3),
The PAPI Web Site: http://icl.cs.utk.edu/projects/papi


PAPI Function Reference PAPI_destroy_eventset (3) December, 2001

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee