src/components/rocm/linux-rocm.c
/* Triggered by PAPI_reset() but only if the EventSet is currently
 *  running. If the eventset is not currently running, then the saved
 *  value in the EventSet is set to zero without calling this
 *  routine.  */
Triggered by PAPI_reset() but only if the EventSet is currently
running. If the eventset is not currently running, then the saved
value in the EventSet is set to zero without calling this
routine.
Triggered by PAPI_reset () but only if the EventSet is currently running . If the eventset is not currently running then the saved value in the EventSet is set to zero without calling this routine .
static int _rocm_reset(hwd_context_t * ctx, hwd_control_state_t * ctrl)
{
    ROCMDBG("Entering _rocm_reset\n");
    (void) ctx;
    (void) ctrl;
    _rocm_control_t *gctrl = global__rocm_control;
    uint32_t ii, cc;
    ROCMDBG("Reset all active event values\n");
    for(ii = 0; ii < gctrl->activeEventCount; ii++)
        gctrl->activeEventValues[ii] = 0;
    for(cc = 0; cc < gctrl->countOfActiveContexts; cc++) {
        int eventDeviceNum = gctrl->arrayOfActiveContexts[cc]->deviceNum;
        (void) eventDeviceNum;                                          
        Context eventCtx = gctrl->arrayOfActiveContexts[cc]->ctx;
        ROCMDBG("Reset device %d ctx %p \n", eventDeviceNum, eventCtx);
        ROCP_CALL_CK(rocprofiler_reset, (eventCtx, 0), return (PAPI_EMISC));
    }
    return (PAPI_OK);
}
static int _rocm_reset ( hwd_context_t * ctx , hwd_control_state_t * ctrl ) { ROCMDBG ( " \n " ) ; ( void ) ctx ; ( void ) ctrl ; _rocm_control_t * gctrl = global__rocm_control ; uint32_t ii , cc ; ROCMDBG ( " \n " ) ; for ( ii = 0 ; ii < gctrl -> activeEventCount ; ii ++ ) gctrl -> activeEventValues [ ii ] = 0 ; for ( cc = 0 ; cc < gctrl -> countOfActiveContexts ; cc ++ ) { int eventDeviceNum = gctrl -> arrayOfActiveContexts [ cc ] -> deviceNum ; ( void ) eventDeviceNum ; Context eventCtx = gctrl -> arrayOfActiveContexts [ cc ] -> ctx ; ROCMDBG ( " \n " , eventDeviceNum , eventCtx ) ; ROCP_CALL_CK ( rocprofiler_reset , ( eventCtx , 0 ) , return ( PAPI_EMISC ) ) ; } return ( PAPI_OK ) ; }
Triggered by PAPI_reset() but only if the EventSet is currently
  running.
Triggered by PAPI_reset () but only if the EventSet is currently running .
// Suppress 'not used' error when not debug.