src/components/powercap_ppc/linux-powercap-ppc.c
/*
 * One counter only is writable, the current power one
 * */
One counter only is writable, the current power one
One counter only is writable the current power one
static int
_powercap_ppc_write( hwd_context_t * ctx, hwd_control_state_t * ctl, long long *values )
{
    (void) ctx;
    _powercap_ppc_control_state_t *control = ( _powercap_ppc_control_state_t * ) ctl;
    int i;
    for (i = 0; i < control->active_counters; i++) {
      if (PKG_CUR_POWER == powercap_ppc_ntv_events[control->which_counter[i]].type)
        write_powercap_value(control->which_counter[i], values[i]);
    }
    return PAPI_OK;
}
static int _powercap_ppc_write ( hwd_context_t * ctx , hwd_control_state_t * ctl , long long * values ) { ( void ) ctx ; _powercap_ppc_control_state_t * control = ( _powercap_ppc_control_state_t * ) ctl ; int i ; for ( i = 0 ; i < control -> active_counters ; i ++ ) { if ( PKG_CUR_POWER == powercap_ppc_ntv_events [ control -> which_counter [ i ] ] . type ) write_powercap_value ( control -> which_counter [ i ] , values [ i ] ) ; } return PAPI_OK ; }
One counter only is writable, the current power one
One counter only is writable the current power one