src/components/rocm/linux-rocm.c
//----------------------------------------------------------------------------
// Takes a native event code and passes back the name, but the PAPI version
// of the name in availEventDesc[], not the ROCM internal name (in
// availEventIDArray[].name).
// @param EventCode is the native event code
// @param name is a pointer for the name to be copied to
// @param len is the size of the name string
//----------------------------------------------------------------------------
Takes a native event code and passes back the name, but the PAPI version
of the name in availEventDesc[], not the ROCM internal name (in
availEventIDArray[].name).
Takes a native event code and passes back the name but the PAPI version of the name in availEventDesc [] not the ROCM internal name ( in availEventIDArray [] . name ) .
static int _rocm_ntv_code_to_name(unsigned int EventCode, char *name, int len)
{
    unsigned int index = EventCode;
    _rocm_context_t *gctxt = global__rocm_context;
    if(gctxt != NULL && index < gctxt->availEventSize) {
        strncpy(name, gctxt->availEventDesc[index].name, len);
    } else {
        return (PAPI_EINVAL);
    }
    return (PAPI_OK);
}
static int _rocm_ntv_code_to_name ( unsigned int EventCode , char * name , int len ) { unsigned int index = EventCode ; _rocm_context_t * gctxt = global__rocm_context ; if ( gctxt != NULL && index < gctxt -> availEventSize ) { strncpy ( name , gctxt -> availEventDesc [ index ] . name , len ) ; } else { return ( PAPI_EINVAL ) ; } return ( PAPI_OK ) ; }
Takes a native event code and passes back the name, but the PAPI version
of the name in availEventDesc[], not the ROCM internal name (in
availEventIDArray[].name).
Takes a native event code and passes back the name but the PAPI version of the name in availEventDesc [] not the ROCM internal name ( in availEventIDArray [] . name ) .
//ROCMDBG("Entering EventCode %d\n", EventCode ); //ROCMDBG( "Exit: EventCode %d: Name %s\n", EventCode, name );