Throttle.hh (6285:ce086eca1ede) | Throttle.hh (7024:30883414ad10) |
---|---|
1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 49 unchanged lines hidden (view full) --- 58 Throttle(NodeID node, int link_latency, int link_bandwidth_multiplier); 59 60 // Destructor 61 ~Throttle() {} 62 63 // Public Methods 64 void addLinks(const Vector<MessageBuffer*>& in_vec, const Vector<MessageBuffer*>& out_vec); 65 void wakeup(); | 1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 49 unchanged lines hidden (view full) --- 58 Throttle(NodeID node, int link_latency, int link_bandwidth_multiplier); 59 60 // Destructor 61 ~Throttle() {} 62 63 // Public Methods 64 void addLinks(const Vector<MessageBuffer*>& in_vec, const Vector<MessageBuffer*>& out_vec); 65 void wakeup(); |
66 bool broadcastBandwidthAvailable(int rand) const; | |
67 68 void printStats(ostream& out) const; 69 void clearStats(); 70 void printConfig(ostream& out) const; 71 double getUtilization() const; // The average utilization (a percent) since last clearStats() 72 int getLinkBandwidth() const { return RubySystem::getNetwork()->getEndpointBandwidth() * m_link_bandwidth_multiplier; } 73 int getLatency() const { return m_link_latency; } 74 --- 16 unchanged lines hidden (view full) --- 91 // Data Members (m_ prefix) 92 Vector<MessageBuffer*> m_in; 93 Vector<MessageBuffer*> m_out; 94 Vector<Vector<int> > m_message_counters; 95 int m_vnets; 96 Vector<int> m_units_remaining; 97 int m_sID; 98 NodeID m_node; | 66 67 void printStats(ostream& out) const; 68 void clearStats(); 69 void printConfig(ostream& out) const; 70 double getUtilization() const; // The average utilization (a percent) since last clearStats() 71 int getLinkBandwidth() const { return RubySystem::getNetwork()->getEndpointBandwidth() * m_link_bandwidth_multiplier; } 72 int getLatency() const { return m_link_latency; } 73 --- 16 unchanged lines hidden (view full) --- 90 // Data Members (m_ prefix) 91 Vector<MessageBuffer*> m_in; 92 Vector<MessageBuffer*> m_out; 93 Vector<Vector<int> > m_message_counters; 94 int m_vnets; 95 Vector<int> m_units_remaining; 96 int m_sID; 97 NodeID m_node; |
99 int m_bash_counter; 100 int m_bandwidth_since_sample; 101 Time m_last_bandwidth_sample; | |
102 int m_link_bandwidth_multiplier; 103 int m_link_latency; 104 int m_wakeups_wo_switch; 105 106 // For tracking utilization 107 Time m_ruby_start; 108 double m_links_utilized; 109}; --- 16 unchanged lines hidden --- | 98 int m_link_bandwidth_multiplier; 99 int m_link_latency; 100 int m_wakeups_wo_switch; 101 102 // For tracking utilization 103 Time m_ruby_start; 104 double m_links_utilized; 105}; --- 16 unchanged lines hidden --- |