Blame man/man3/PAPI_event_code_to_name.3

Packit Service a1973e
.TH "PAPI_event_code_to_name" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit Service a1973e
.ad l
Packit Service a1973e
.nh
Packit Service a1973e
.SH NAME
Packit Service a1973e
PAPI_event_code_to_name \- 
Packit Service a1973e
.PP
Packit Service a1973e
Convert a numeric hardware event code to a name\&.  
Packit Service a1973e
Packit Service a1973e
.SH SYNOPSIS
Packit Service a1973e
.br
Packit Service a1973e
.PP
Packit Service a1973e
.SH "Detailed Description"
Packit Service a1973e
.PP 
Packit Service a1973e
Packit Service a1973e
.PP
Packit Service a1973e
.nf
Packit Service a1973e
@par C Interface:
Packit Service a1973e
\#include <papi.h> @n
Packit Service a1973e
int PAPI_event_code_to_name( int  EventCode, char * EventName );
Packit Service a1973e
Packit Service a1973e
PAPI_event_code_to_name is used to translate a 32-bit integer PAPI event 
Packit Service a1973e
code into an ASCII PAPI event name. 
Packit Service a1973e
Either Preset event codes or Native event codes can be passed to this routine. 
Packit Service a1973e
Native event codes and names differ from platform to platform.
Packit Service a1973e
Packit Service a1973e
@param EventCode 
Packit Service a1973e
    The numeric code for the event. 
Packit Service a1973e
@param *EventName
Packit Service a1973e
    A string containing the event name as listed in PAPI_presets or discussed in PAPI_native.
Packit Service a1973e
Packit Service a1973e
@retval PAPI_EINVAL 
Packit Service a1973e
    One or more of the arguments is invalid.
Packit Service a1973e
@retval PAPI_ENOTPRESET 
Packit Service a1973e
    The hardware event specified is not a valid PAPI preset.
Packit Service a1973e
@retval PAPI_ENOEVNT 
Packit Service a1973e
    The hardware event is not available on the underlying hardware. 
Packit Service a1973e
Packit Service a1973e
@par Examples:
Packit Service a1973e
Packit Service a1973e
.fi
Packit Service a1973e
.PP
Packit Service a1973e
 
Packit Service a1973e
.PP
Packit Service a1973e
.nf
Packit Service a1973e
*   int EventCode, EventSet = PAPI_NULL;
Packit Service a1973e
*  int Event, number;
Packit Service a1973e
*   char EventCodeStr[PAPI_MAX_STR_LEN];
Packit Service a1973e
*   // Create the EventSet
Packit Service a1973e
*   if ( PAPI_create_eventset( &EventSet ) != PAPI_OK )
Packit Service a1973e
*   handle_error( 1 );
Packit Service a1973e
*   // Add Total Instructions Executed to our EventSet
Packit Service a1973e
*   if ( PAPI_add_event( EventSet, PAPI_TOT_INS ) != PAPI_OK )
Packit Service a1973e
*   handle_error( 1 );
Packit Service a1973e
*   number = 1;
Packit Service a1973e
*   if ( PAPI_list_events( EventSet, &Event, &number ) != PAPI_OK )
Packit Service a1973e
*   handle_error(1);
Packit Service a1973e
*   // Convert integer code to name string
Packit Service a1973e
*   if ( PAPI_event_code_to_name( Event, EventCodeStr ) != PAPI_OK )
Packit Service a1973e
*   handle_error( 1 );
Packit Service a1973e
*   printf( "Event Name: %s\n", EventCodeStr );
Packit Service a1973e
*   
Packit Service a1973e
Packit Service a1973e
.fi
Packit Service a1973e
.PP
Packit Service a1973e
.PP
Packit Service a1973e
\fBSee Also:\fP
Packit Service a1973e
.RS 4
Packit Service a1973e
\fBPAPI_event_name_to_code\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_remove_event\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_get_event_info\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_enum_event\fP 
Packit Service a1973e
.PP
Packit Service a1973e
\fBPAPI_add_event\fP 
Packit Service a1973e
.PP
Packit Service a1973e
PAPI_presets 
Packit Service a1973e
.PP
Packit Service a1973e
PAPI_native 
Packit Service a1973e
.RE
Packit Service a1973e
.PP
Packit Service a1973e
Packit Service a1973e
Packit Service a1973e
.SH "Author"
Packit Service a1973e
.PP 
Packit Service a1973e
Generated automatically by Doxygen for PAPI from the source code\&.