Deleted Added
sdiff udiff text old ( 9117:49116b947194 ) new ( 9274:ba635023d4bb )
full compact
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;

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

73 m_fromNetQueues[node].resize(m_virtual_networks);
74 for (int j = 0; j < m_virtual_networks; j++) {
75 m_toNetQueues[node][j] =
76 new MessageBuffer(csprintf("toNet node %d j %d", node, j));
77 m_fromNetQueues[node][j] =
78 new MessageBuffer(csprintf("fromNet node %d j %d", node, j));
79 }
80 }
81}
82
83void
84SimpleNetwork::init()
85{
86 Network::init();
87
88 // The topology pointer should have already been initialized in
89 // the parent class network constructor.
90 assert(m_topology_ptr != NULL);
91 int number_of_switches = m_topology_ptr->numSwitches();
92 for (int i = 0; i < number_of_switches; i++) {
93 m_switch_ptr_vector.push_back(new Switch(i, this));
94 }
95
96 // false because this isn't a reconfiguration
97 m_topology_ptr->createLinks(this, false);
98}
99
100void
101SimpleNetwork::reset()
102{
103 for (int node = 0; node < m_nodes; node++) {

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

277 uint64 total_msgs = 0;
278 uint64 total_bytes = 0;
279 for (MessageSizeType type = MessageSizeType_FIRST;
280 type < MessageSizeType_NUM;
281 ++type) {
282
283 if (total_msg_counts[type] > 0) {
284 out << "total_msg_count_" << type << ": " << total_msg_counts[type]
285 << " " << total_msg_counts[type] *
286 uint64(RubySystem::getNetwork()->MessageSizeType_to_int(type))
287 << endl;
288
289 total_msgs += total_msg_counts[type];
290
291 total_bytes += total_msg_counts[type] *
292 uint64(RubySystem::getNetwork()->MessageSizeType_to_int(type));
293
294 }
295 }
296
297 out << "total_msgs: " << total_msgs
298 << " total_bytes: " << total_bytes << endl;
299
300 out << endl;
301 for (int i = 0; i < m_switch_ptr_vector.size(); i++) {

--- 25 unchanged lines hidden ---