Throttle.hh (10311:ad9c042dce54) | Throttle.hh (10370:4466307b8a2a) |
---|---|
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; --- 48 unchanged lines hidden (view full) --- 57 ClockedObject *em); 58 Throttle(NodeID node, Cycles link_latency, int link_bandwidth_multiplier, 59 int endpoint_bandwidth, ClockedObject *em); 60 ~Throttle() {} 61 62 std::string name() 63 { return csprintf("Throttle-%i", m_sID); } 64 | 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; --- 48 unchanged lines hidden (view full) --- 57 ClockedObject *em); 58 Throttle(NodeID node, Cycles link_latency, int link_bandwidth_multiplier, 59 int endpoint_bandwidth, ClockedObject *em); 60 ~Throttle() {} 61 62 std::string name() 63 { return csprintf("Throttle-%i", m_sID); } 64 |
65 void addLinks(const std::map<int, MessageBuffer*>& in_vec, 66 const std::map<int, MessageBuffer*>& out_vec); | 65 void addLinks(const std::vector<MessageBuffer*>& in_vec, 66 const std::vector<MessageBuffer*>& out_vec); |
67 void wakeup(); 68 69 // The average utilization (a fraction) since last clearStats() 70 const Stats::Scalar & getUtilization() const 71 { return m_link_utilization; } 72 const Stats::Vector & getMsgCount(unsigned int type) const 73 { return m_msg_counts[type]; } 74 --- 12 unchanged lines hidden (view full) --- 87 int endpoint_bandwidth); 88 void operateVnet(int vnet, int &bw_remainin, bool &schedule_wakeup, 89 MessageBuffer *in, MessageBuffer *out); 90 91 // Private copy constructor and assignment operator 92 Throttle(const Throttle& obj); 93 Throttle& operator=(const Throttle& obj); 94 | 67 void wakeup(); 68 69 // The average utilization (a fraction) since last clearStats() 70 const Stats::Scalar & getUtilization() const 71 { return m_link_utilization; } 72 const Stats::Vector & getMsgCount(unsigned int type) const 73 { return m_msg_counts[type]; } 74 --- 12 unchanged lines hidden (view full) --- 87 int endpoint_bandwidth); 88 void operateVnet(int vnet, int &bw_remainin, bool &schedule_wakeup, 89 MessageBuffer *in, MessageBuffer *out); 90 91 // Private copy constructor and assignment operator 92 Throttle(const Throttle& obj); 93 Throttle& operator=(const Throttle& obj); 94 |
95 std::map<int, MessageBuffer*> m_in; 96 std::map<int, MessageBuffer*> m_out; 97 std::map<int, int> m_units_remaining; | 95 std::vector<MessageBuffer*> m_in; 96 std::vector<MessageBuffer*> m_out; 97 unsigned int m_vnets; 98 std::vector<int> m_units_remaining; |
98 99 int m_sID; 100 NodeID m_node; 101 int m_link_bandwidth_multiplier; 102 Cycles m_link_latency; 103 int m_wakeups_wo_switch; 104 int m_endpoint_bandwidth; 105 --- 17 unchanged lines hidden --- | 99 100 int m_sID; 101 NodeID m_node; 102 int m_link_bandwidth_multiplier; 103 Cycles m_link_latency; 104 int m_wakeups_wo_switch; 105 int m_endpoint_bandwidth; 106 --- 17 unchanged lines hidden --- |