Network.hh (9117:49116b947194) Network.hh (9275:ef43e69c837a)
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;

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

59{
60 public:
61 typedef RubyNetworkParams Params;
62 Network(const Params *p);
63 virtual ~Network() {}
64
65 virtual void init();
66
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;

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

59{
60 public:
61 typedef RubyNetworkParams Params;
62 Network(const Params *p);
63 virtual ~Network() {}
64
65 virtual void init();
66
67 int getNumberOfVirtualNetworks() { return m_virtual_networks; }
68 int MessageSizeType_to_int(MessageSizeType size_type);
67 static int getNumberOfVirtualNetworks() { return m_virtual_networks; }
68 static uint32_t MessageSizeType_to_int(MessageSizeType size_type);
69
70 // returns the queue requested for the given component
71 virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
72 int netNumber, std::string vnet_type) = 0;
73 virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered,
74 int netNumber, std::string vnet_type) = 0;
75 virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
76 virtual int getNumNodes() {return 1;}

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

97 protected:
98 // Private copy constructor and assignment operator
99 Network(const Network& obj);
100 Network& operator=(const Network& obj);
101
102 protected:
103 const std::string m_name;
104 int m_nodes;
69
70 // returns the queue requested for the given component
71 virtual MessageBuffer* getToNetQueue(NodeID id, bool ordered,
72 int netNumber, std::string vnet_type) = 0;
73 virtual MessageBuffer* getFromNetQueue(NodeID id, bool ordered,
74 int netNumber, std::string vnet_type) = 0;
75 virtual const std::vector<Throttle*>* getThrottles(NodeID id) const;
76 virtual int getNumNodes() {return 1;}

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

97 protected:
98 // Private copy constructor and assignment operator
99 Network(const Network& obj);
100 Network& operator=(const Network& obj);
101
102 protected:
103 const std::string m_name;
104 int m_nodes;
105 int m_virtual_networks;
105 static uint32_t m_virtual_networks;
106 Topology* m_topology_ptr;
106 Topology* m_topology_ptr;
107 int m_control_msg_size;
108 int m_data_msg_size;
107 static uint32_t m_control_msg_size;
108 static uint32_t m_data_msg_size;
109};
110
111inline std::ostream&
112operator<<(std::ostream& out, const Network& obj)
113{
114 obj.print(out);
115 out << std::flush;
116 return out;
117}
118
119#endif // __MEM_RUBY_NETWORK_NETWORK_HH__
109};
110
111inline std::ostream&
112operator<<(std::ostream& out, const Network& obj)
113{
114 obj.print(out);
115 out << std::flush;
116 return out;
117}
118
119#endif // __MEM_RUBY_NETWORK_NETWORK_HH__