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_perror - Produces a string on standard error, describing the last library error.

Author

       Generated automatically by Doxygen for PAPI from the source code.

Version 7.1.0.0                                  Thu Dec 14 2023                                  PAPI_perror(3)

Detailed Description

CInterface:
           #include <papi.h>
            void PAPI_perror(constchar*s);

       Parameterss -- Optional message to print before the string describing the last error message.

       The routine PAPI_perror() produces a message on the standard error output, describing the last error
       encountered during a call to PAPI. If s is not NULL, s is printed, followed by a colon and a space. Then
       the error message and a new-line are printed.

       Example:

           int ret;
           int EventSet = PAPI_NULL;
           int native = 0x0;

           ret = PAPI_create_eventset(&EventSet);
           if (ret != PAPI_OK)
           {
              fprintf(stderr, \"PAPI error %d: %s\\n\", ret, PAPI_strerror(retval));
              exit(1);
           }
           // Add Total Instructions Executed to our EventSet
           ret = PAPI_add_event(EventSet, PAPI_TOT_INS);
           if (ret != PAPI_OK)
           {
              PAPI_perror( "PAPI_add_event" );
              exit(1);
           }
           // Start counting
           ret = PAPI_start(EventSet);
           if (ret != PAPI_OK) handle_error(ret);

       SeealsoPAPI_strerror

Name

       PAPI_perror - Produces a string on standard error, describing the last library error.

Synopsis

See Also