PerfectSwitch.hh (9554:406fbcf60223) | PerfectSwitch.hh (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; --- 53 unchanged lines hidden (view full) --- 62 ~PerfectSwitch(); 63 64 std::string name() 65 { return csprintf("PerfectSwitch-%i", m_switch_id); } 66 67 void init(SimpleNetwork *); 68 void addInPort(const std::vector<MessageBuffer*>& in); 69 void addOutPort(const std::vector<MessageBuffer*>& out, | 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; --- 53 unchanged lines hidden (view full) --- 62 ~PerfectSwitch(); 63 64 std::string name() 65 { return csprintf("PerfectSwitch-%i", m_switch_id); } 66 67 void init(SimpleNetwork *); 68 void addInPort(const std::vector<MessageBuffer*>& in); 69 void addOutPort(const std::vector<MessageBuffer*>& out, |
70 const NetDest& routing_table_entry); 71 void clearRoutingTables(); 72 void clearBuffers(); 73 void reconfigureOutPort(const NetDest& routing_table_entry); | 70 const NetDest& routing_table_entry); |
74 int getInLinks() const { return m_in.size(); } 75 int getOutLinks() const { return m_out.size(); } 76 77 void wakeup(); 78 void storeEventInfo(int info); 79 | 71 int getInLinks() const { return m_in.size(); } 72 int getOutLinks() const { return m_out.size(); } 73 74 void wakeup(); 75 void storeEventInfo(int info); 76 |
80 void printStats(std::ostream& out) const; | |
81 void clearStats(); | 77 void clearStats(); |
78 void collateStats(); |
|
82 void print(std::ostream& out) const; 83 84 private: 85 // Private copy constructor and assignment operator 86 PerfectSwitch(const PerfectSwitch& obj); 87 PerfectSwitch& operator=(const PerfectSwitch& obj); 88 89 SwitchID m_switch_id; --- 24 unchanged lines hidden --- | 79 void print(std::ostream& out) const; 80 81 private: 82 // Private copy constructor and assignment operator 83 PerfectSwitch(const PerfectSwitch& obj); 84 PerfectSwitch& operator=(const PerfectSwitch& obj); 85 86 SwitchID m_switch_id; --- 24 unchanged lines hidden --- |