models/network/iris/components/simpleArbiter.cc
unsigned
RRSimpleArbiter::pick_winner ()
{
    for ( uint i=last_winner+1; i<requested.size() ; i++ )
        if ( requested[i] )
        {
            last_winner = i;
            return last_winner;
        }

    for ( uint i=0; i<=last_winner ; i++ )
        if ( requested[i] )
        {
            last_winner = i;
            return last_winner;
        }

    return no_channels;
}
//! Pick a winner using round-robin priority, i.e., the last winner
//! would have the lowest priority.
//! @return  The winning VC, or no_channels if there's no requester.
Pick a winner using round-robin priority, i.e., the last winner
would have the lowest priority.
Pick a winner using round - robin priority i . e . the last winner would have the lowest priority .
unsigned
RRSimpleArbiter::pick_winner ()
{
    for ( uint i=last_winner+1; i<requested.size() ; i++ )
        if ( requested[i] )
        {
            last_winner = i;
            return last_winner;
        }
    for ( uint i=0; i<=last_winner ; i++ )
        if ( requested[i] )
        {
            last_winner = i;
            return last_winner;
        }
    return no_channels;
}
unsigned RRSimpleArbiter :: pick_winner ( ) { for ( uint i = last_winner + 1 ; i < requested . size ( ) ; i ++ ) if ( requested [ i ] ) { last_winner = i ; return last_winner ; } for ( uint i = 0 ; i <= last_winner ; i ++ ) if ( requested [ i ] ) { last_winner = i ; return last_winner ; } return no_channels ; }
Pick a winner using round-robin priority, i.e., the last winner
would have the lowest priority.
Pick a winner using round - robin priority i . e . the last winner would have the lowest priority .