PAPI 7.1.0.0
Loading...
Searching...
No Matches
PAPI_query_event Class Reference

Query if PAPI event exists. More...

Detailed Description

C Interface:
#include <papi.h>
int PAPI_query_event(int EventCode);

PAPI_query_event() asks the PAPI library if the PAPI Preset event can be counted on this architecture. If the event CAN be counted, the function returns PAPI_OK. If the event CANNOT be counted, the function returns an error code. This function also can be used to check the syntax of native and user events.

Parameters
EventCode– a defined event such as PAPI_TOT_INS.
Return values
PAPI_EINVALOne or more of the arguments is invalid.
PAPI_ENOEVNTThe PAPI preset is not available on the underlying hardware.
Examples
int retval;
// Initialize the library
fprintf(stderr,\"PAPI library init error!\\n\");
exit(1);
}
if (PAPI_query_event(PAPI_TOT_INS) != PAPI_OK) {
fprintf(stderr,\"No instruction counter? How lame.\\n\");
exit(1);
}
initialize the PAPI library.
#define PAPI_VER_CURRENT
Definition: f90papi.h:54
FILE * stderr
int retval
Definition: zero_fork.c:53
See also
PAPI_remove_event
PAPI_remove_events
PAPI_presets
PAPI_native

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