logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PAPI_query_event - Query if PAPI event exists.

Author

       Generated automatically by Doxygen for PAPI from the source code.

Version 7.1.0.0                                  Thu Dec 14 2023                             PAPI_query_event(3)

Detailed Description

CInterface:
           #include <papi.h>
           int PAPI_query_event(intEventCode);

       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.

       ParametersEventCode -- a defined event such as PAPI_TOT_INS.

       ReturnvaluesPAPI_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_event(PAPI_TOT_INS) != PAPI_OK) {
             fprintf(stderr,\"No instruction counter? How lame.\\n\");
             exit(1);
           }

       SeealsoPAPI_remove_eventPAPI_remove_events

           PAPI_presets

           PAPI_native

Name

       PAPI_query_event - Query if PAPI event exists.

Synopsis

See Also