PAPI_query_named_event Class Reference

Query if a named PAPI event exists. More...


Detailed Description

C Interface:
#include <papi.h>
int PAPI_query_named_event(char *EventName);

PAPI_query_named_event() asks the PAPI library if the PAPI named 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:
EventName -- a defined event such as PAPI_TOT_INS.
Return values:
PAPI_EINVAL One or more of the arguments is invalid.
PAPI_ENOEVNT The PAPI preset is not available on the underlying hardware.
Examples
 int retval;
 // Initialize the library
 retval = PAPI_library_init(PAPI_VER_CURRENT);
 if (retval != PAPI_VER_CURRENT) {
   fprintf(stderr,\"PAPI library init error!\\n\");
   exit(1); 
 }
 if (PAPI_query_named_event("PAPI_TOT_INS") != PAPI_OK) {
   fprintf(stderr,\"No instruction counter? How lame.\\n\");
   exit(1);
 }
See also:
PAPI_query_event

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

Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1