Scroll to navigation

PAPI_num_events(3) PAPI PAPI_num_events(3)

NAME

PAPI_num_events - return the number of events in an event set

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

The event count is zero; only if code is compiled with debug enabled.
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)

September, 2004 PAPI Programmer's Reference