models/memory/CaffDRAM/McMap.cpp
int CaffDramMcMap :: lookup(uint64_t addr)
{
    if(m_nodeIds.size() == 1) { //if there is only one MC
	return m_nodeIds[0];
    }
    else {
	int idx = ((addr >> m_mc_shift_bits) & m_mc_selector_mask);
	assert(idx < m_nodeIds.size());
	return m_nodeIds[idx];
    }
}
//! Return the node ID of the MC for a given address.
Return the node ID of the MC for a given address.
Return the node ID of the MC for a given address .
int CaffDramMcMap :: lookup(uint64_t addr)
{
    if(m_nodeIds.size() == 1) { 
	return m_nodeIds[0];
    }
    else {
	int idx = ((addr >> m_mc_shift_bits) & m_mc_selector_mask);
	assert(idx < m_nodeIds.size());
	return m_nodeIds[idx];
    }
}
int CaffDramMcMap :: lookup ( uint64_t addr ) { if ( m_nodeIds . size ( ) == 1 ) { return m_nodeIds [ 0 ] ; } else { int idx = ( ( addr >> m_mc_shift_bits ) & m_mc_selector_mask ) ; assert ( idx < m_nodeIds . size ( ) ) ; return m_nodeIds [ idx ] ; } }
Return the node ID of the MC for a given address.
Return the node ID of the MC for a given address .
//if there is only one MC