PerfectSwitch.cc (9508:dde110931867) PerfectSwitch.cc (9863:9483739f83ee)
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;

--- 88 unchanged lines hidden (view full) ---

97 l.m_link = m_out.size();
98 m_link_order.push_back(l);
99
100 // Add to routing table
101 m_out.push_back(out);
102 m_routing_table.push_back(routing_table_entry);
103}
104
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;

--- 88 unchanged lines hidden (view full) ---

97 l.m_link = m_out.size();
98 m_link_order.push_back(l);
99
100 // Add to routing table
101 m_out.push_back(out);
102 m_routing_table.push_back(routing_table_entry);
103}
104
105void
106PerfectSwitch::clearRoutingTables()
107{
108 m_routing_table.clear();
109}
110
111void
112PerfectSwitch::clearBuffers()
113{
114 for (int i = 0; i < m_in.size(); i++){
115 for(int vnet = 0; vnet < m_virtual_networks; vnet++) {
116 m_in[i][vnet]->clear();
117 }
118 }
119
120 for (int i = 0; i < m_out.size(); i++){
121 for(int vnet = 0; vnet < m_virtual_networks; vnet++) {
122 m_out[i][vnet]->clear();
123 }
124 }
125}
126
127void
128PerfectSwitch::reconfigureOutPort(const NetDest& routing_table_entry)
129{
130 m_routing_table.push_back(routing_table_entry);
131}
132
133PerfectSwitch::~PerfectSwitch()
134{
135}
136
137void
138PerfectSwitch::wakeup()
139{
140 MsgPtr msg_ptr;

--- 183 unchanged lines hidden (view full) ---

324
325void
326PerfectSwitch::storeEventInfo(int info)
327{
328 m_pending_message_count[info]++;
329}
330
331void
105PerfectSwitch::~PerfectSwitch()
106{
107}
108
109void
110PerfectSwitch::wakeup()
111{
112 MsgPtr msg_ptr;

--- 183 unchanged lines hidden (view full) ---

296
297void
298PerfectSwitch::storeEventInfo(int info)
299{
300 m_pending_message_count[info]++;
301}
302
303void
332PerfectSwitch::printStats(std::ostream& out) const
304PerfectSwitch::clearStats()
333{
305{
334 out << "PerfectSwitch printStats" << endl;
335}
306}
336
337void
307void
338PerfectSwitch::clearStats()
308PerfectSwitch::collateStats()
339{
340}
341
309{
310}
311
312
342void
343PerfectSwitch::print(std::ostream& out) const
344{
345 out << "[PerfectSwitch " << m_switch_id << "]";
346}
313void
314PerfectSwitch::print(std::ostream& out) const
315{
316 out << "[PerfectSwitch " << m_switch_id << "]";
317}