src/components/rocm_smi/linux-rocm-smi.c
// Takes a native event code and passes back the name.
Takes a native event code and passes back the name.
Takes a native event code and passes back the name .
static int _rocm_smi_ntv_code_to_name(unsigned int EventCode, char *name, int len)
{
    if (EventCode >= ((unsigned int) TotalEvents)) return(PAPI_ENOEVNT);    
    if (name == NULL || len < 2) return(PAPI_EINVAL);                       
    strncpy(name, AllEvents[EventCode].name, len);
    return (PAPI_OK);
}
static int _rocm_smi_ntv_code_to_name ( unsigned int EventCode , char * name , int len ) { if ( EventCode >= ( ( unsigned int ) TotalEvents ) ) return ( PAPI_ENOEVNT ) ; if ( name == NULL || len < 2 ) return ( PAPI_EINVAL ) ; strncpy ( name , AllEvents [ EventCode ] . name , len ) ; return ( PAPI_OK ) ; }
Takes a native event code and passes back the name.
Takes a native event code and passes back the name .
// Bad event code. // Invalid arguments.