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; --- 39 unchanged lines hidden (view full) --- 48{ 49 public: 50 typedef SimpleNetworkParams Params; 51 SimpleNetwork(const Params *p); 52 ~SimpleNetwork(); 53 54 void init(); 55 |
56 int getBufferSize() { return m_buffer_size; } 57 int getEndpointBandwidth() { return m_endpoint_bandwidth; } 58 bool getAdaptiveRouting() {return m_adaptive_routing; } 59 |
60 void printStats(std::ostream& out) const; 61 void clearStats(); 62 void printConfig(std::ostream& out) const; 63 64 void reset(); 65 66 // returns the queue requested for the given component 67 MessageBuffer* getToNetQueue(NodeID id, bool ordered, int network_num); --- 38 unchanged lines hidden (view full) --- 106 std::vector<std::vector<MessageBuffer*> > m_toNetQueues; 107 std::vector<std::vector<MessageBuffer*> > m_fromNetQueues; 108 109 std::vector<bool> m_in_use; 110 std::vector<bool> m_ordered; 111 std::vector<Switch*> m_switch_ptr_vector; 112 std::vector<MessageBuffer*> m_buffers_to_free; 113 std::vector<Switch*> m_endpoint_switches; |
114 115 int m_buffer_size; 116 int m_endpoint_bandwidth; 117 bool m_adaptive_routing; |
118}; 119 120inline std::ostream& 121operator<<(std::ostream& out, const SimpleNetwork& obj) 122{ 123 obj.print(out); 124 out << std::flush; 125 return out; 126} 127 128#endif // __MEM_RUBY_NETWORK_SIMPLE_SIMPLENETWORK_HH__ |