SimpleNetwork.cc (11523:81332eb10367) | SimpleNetwork.cc (11663:cf870cd20cfc) |
---|---|
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; --- 64 unchanged lines hidden (view full) --- 73SimpleNetwork::~SimpleNetwork() 74{ 75 deletePointers(m_switches); 76 deletePointers(m_int_link_buffers); 77} 78 79// From a switch to an endpoint node 80void | 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; --- 64 unchanged lines hidden (view full) --- 73SimpleNetwork::~SimpleNetwork() 74{ 75 deletePointers(m_switches); 76 deletePointers(m_int_link_buffers); 77} 78 79// From a switch to an endpoint node 80void |
81SimpleNetwork::makeOutLink(SwitchID src, NodeID dest, BasicLink* link, 82 LinkDirection direction, | 81SimpleNetwork::makeExtOutLink(SwitchID src, NodeID dest, BasicLink* link, |
83 const NetDest& routing_table_entry) 84{ 85 assert(dest < m_nodes); 86 assert(src < m_switches.size()); 87 assert(m_switches[src] != NULL); 88 89 SimpleExtLink *simple_link = safe_cast<SimpleExtLink*>(link); 90 91 m_switches[src]->addOutPort(m_fromNetQueues[dest], routing_table_entry, 92 simple_link->m_latency, 93 simple_link->m_bw_multiplier); 94} 95 96// From an endpoint node to a switch 97void | 82 const NetDest& routing_table_entry) 83{ 84 assert(dest < m_nodes); 85 assert(src < m_switches.size()); 86 assert(m_switches[src] != NULL); 87 88 SimpleExtLink *simple_link = safe_cast<SimpleExtLink*>(link); 89 90 m_switches[src]->addOutPort(m_fromNetQueues[dest], routing_table_entry, 91 simple_link->m_latency, 92 simple_link->m_bw_multiplier); 93} 94 95// From an endpoint node to a switch 96void |
98SimpleNetwork::makeInLink(NodeID src, SwitchID dest, BasicLink* link, 99 LinkDirection direction, | 97SimpleNetwork::makeExtInLink(NodeID src, SwitchID dest, BasicLink* link, |
100 const NetDest& routing_table_entry) 101{ 102 assert(src < m_nodes); 103 m_switches[dest]->addInPort(m_toNetQueues[src]); 104} 105 106// From a switch to a switch 107void 108SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link, | 98 const NetDest& routing_table_entry) 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, |
109 LinkDirection direction, | |
110 const NetDest& routing_table_entry) 111{ 112 // Create a set of new MessageBuffers 113 std::vector<MessageBuffer*> queues(m_virtual_networks); 114 115 for (int i = 0; i < m_virtual_networks; i++) { 116 // allocate a buffer 117 assert(m_num_connected_buffers < m_int_link_buffers.size()); --- 93 unchanged lines hidden --- | 107 const NetDest& routing_table_entry) 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()); --- 93 unchanged lines hidden --- |