Deleted Added
sdiff udiff text old ( 6372:f1a41ea3bbab ) new ( 6493:1fa51760a963 )
full compact
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

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

66 virtual ~Network() {}
67
68 // Public Methods
69 int getBufferSize() { return m_buffer_size; }
70 int getNumberOfVirtualNetworks() { return m_virtual_networks; }
71 int getEndpointBandwidth() { return m_endpoint_bandwidth; }
72 bool getAdaptiveRouting() {return m_adaptive_routing; }
73 int getLinkLatency() { return m_link_latency; }
74 int MessageSizeType_to_int(MessageSizeType size_type);
75
76
77 // returns the queue requested for the given component
78 virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered, int netNumber) = 0;
79 virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int netNumber) = 0;
80 virtual const Vector<Throttle*>* getThrottles(NodeID id) const { return NULL; }
81
82 virtual int getNumNodes() {return 1;}
83
84 virtual void makeOutLink(SwitchID src, NodeID dest, const NetDest& routing_table_entry, int link_latency, int link_weight, int bw_multiplier, bool isReconfiguration) = 0;

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

104 const string m_name;
105 int m_nodes;
106 int m_virtual_networks;
107 int m_buffer_size;
108 int m_endpoint_bandwidth;
109 Topology* m_topology_ptr;
110 bool m_adaptive_routing;
111 int m_link_latency;
112 int m_control_msg_size;
113 int m_data_msg_size;
114};
115
116// Output operator declaration
117ostream& operator<<(ostream& out, const Network& obj);
118
119// ******************* Definitions *******************
120
121// Output operator definition
122extern inline
123ostream& operator<<(ostream& out, const Network& obj)
124{
125 obj.print(out);
126 out << flush;
127 return out;
128}
129
130#endif //NETWORK_H