SimpleNetwork.cc (11663:cf870cd20cfc) | SimpleNetwork.cc (11664:2365e9e396f7) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 90 unchanged lines hidden (view full) --- 99{ 100 assert(src < m_nodes); 101 m_switches[dest]->addInPort(m_toNetQueues[src]); 102} 103 104// From a switch to a switch 105void 106SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 90 unchanged lines hidden (view full) --- 99{ 100 assert(src < m_nodes); 101 m_switches[dest]->addInPort(m_toNetQueues[src]); 102} 103 104// From a switch to a switch 105void 106SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, |
107 const NetDest& routing_table_entry) | 107 const NetDest& routing_table_entry, 108 PortDirection src_outport, 109 PortDirection dst_inport) |
108{ 109 // Create a set of new MessageBuffers 110 std::vector<MessageBuffer*> queues(m_virtual_networks); 111 112 for (int i = 0; i < m_virtual_networks; i++) { 113 // allocate a buffer 114 assert(m_num_connected_buffers < m_int_link_buffers.size()); 115 MessageBuffer* buffer_ptr = m_int_link_buffers[m_num_connected_buffers]; --- 92 unchanged lines hidden --- | 110{ 111 // Create a set of new MessageBuffers 112 std::vector<MessageBuffer*> queues(m_virtual_networks); 113 114 for (int i = 0; i < m_virtual_networks; i++) { 115 // allocate a buffer 116 assert(m_num_connected_buffers < m_int_link_buffers.size()); 117 MessageBuffer* buffer_ptr = m_int_link_buffers[m_num_connected_buffers]; --- 92 unchanged lines hidden --- |