src/components/rocm/linux-rocm.c
/* Takes a native event code and passes back the event description
 * @param EventCode is the native event code
 * @param descr is a pointer for the description to be copied to
 * @param len is the size of the descr string
 */
Takes a native event code and passes back the event description
@param EventCode is the native event code
@param descr is a pointer for the description to be copied to
@param len is the size of the descr string
Takes a native event code and passes back the event description @param EventCode is the native event code @param descr is a pointer for the description to be copied to @param len is the size of the descr string
static int _rocm_ntv_code_to_descr(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].description, len);
    } else {
        return (PAPI_EINVAL);
    }
    return (PAPI_OK);
}
static int _rocm_ntv_code_to_descr ( 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 ] . description , len ) ; } else { return ( PAPI_EINVAL ) ; } return ( PAPI_OK ) ; }
Takes a native event code and passes back the event description
 @param EventCode is the native event code
 @param descr is a pointer for the description to be copied to
 @param len is the size of the descr string
Takes a native event code and passes back the event description @param EventCode is the native event code @param descr is a pointer for the description to be copied to @param len is the size of the descr string
//ROCMDBG("Entering _rocm_ntv_code_to_descr\n");