NAME

PAPI_num_events - return the number of events in an event set

CONTENTS

Synopsis
Description
Arguments
Return Values
Errors
Examples
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

int PAPI_num_events(int EventSet); 

Fortran Interface

#include fpapi.h 

PAPIF_num_events(C_INT EventSet, C_INT count) 

DESCRIPTION

PAPI_num_events() returns the number of preset events contained in an event set. The event set should be created by PAPI_create_eventset (3).

ARGUMENTS

EventSet -- an integer handle for a PAPI event set as created by PAPI_create_eventset (3)

*count -- On output the variable contains the number of events in the event set.

RETURN VALUES

On success, this function returns the positive number of events in the event set. On error, a non-zero error code is returned.

ERRORS

PAPI_EINVAL
  The event count is zero; only if code is compiled with debug enabled.
PAPI_ENOEVST
  The EventSet specified does not exist.

EXAMPLES


  /* Count the events in our EventSet */
  printf("%d events found in EventSet.0, PAPI_num_events(EventSet));

BUGS

This function has no known bugs.

SEE ALSO

PAPI_add_event (3), PAPI_create_eventset (3), PAPI (3), PAPIF (3)


PAPI Programmer’s Reference PAPI_num_events (3) September, 2004

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