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;

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

61{
62 public:
63 typedef RubyNetworkParams Params;
64 Network(const Params *p);
65 virtual ~Network() {}
66
67 virtual void init();
68
69 int getBufferSize() { return m_buffer_size; }
69 int getNumberOfVirtualNetworks() { return m_virtual_networks; }
71 int getEndpointBandwidth() { return m_endpoint_bandwidth; }
72 bool getAdaptiveRouting() {return m_adaptive_routing; }
70 int getLinkLatency() { return m_link_latency; }
71 int MessageSizeType_to_int(MessageSizeType size_type);
72
73 // returns the queue requested for the given component
74 virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
75 int netNumber) = 0;
76 virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered,
77 int netNumber) = 0;

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

102 // Private copy constructor and assignment operator
103 Network(const Network& obj);
104 Network& operator=(const Network& obj);
105
106 protected:
107 const std::string m_name;
108 int m_nodes;
109 int m_virtual_networks;
113 int m_buffer_size;
114 int m_endpoint_bandwidth;
110 Topology* m_topology_ptr;
116 bool m_adaptive_routing;
111 int m_link_latency;
112 int m_control_msg_size;
113 int m_data_msg_size;
114};
115
116inline std::ostream&
117operator<<(std::ostream& out, const Network& obj)
118{
119 obj.print(out);
120 out << std::flush;
121 return out;
122}
123
124#endif // __MEM_RUBY_NETWORK_NETWORK_HH__