PerfectSwitch.cc (10895:287285860dd6) PerfectSwitch.cc (11021:e8a6637afa4c)
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;

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

71PerfectSwitch::addInPort(const vector<MessageBuffer*>& in)
72{
73 NodeID port = m_in.size();
74 m_in.push_back(in);
75
76 for (int i = 0; i < in.size(); ++i) {
77 if (in[i] != nullptr) {
78 in[i]->setConsumer(this);
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;

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

71PerfectSwitch::addInPort(const vector<MessageBuffer*>& in)
72{
73 NodeID port = m_in.size();
74 m_in.push_back(in);
75
76 for (int i = 0; i < in.size(); ++i) {
77 if (in[i] != nullptr) {
78 in[i]->setConsumer(this);
79
80 string desc =
81 csprintf("[Queue from port %s %s %s to PerfectSwitch]",
82 to_string(m_switch_id), to_string(port),
83 to_string(i));
84
85 in[i]->setDescription(desc);
86 in[i]->setIncomingLink(port);
87 in[i]->setVnet(i);
88 }
89 }
90}
91
92void
93PerfectSwitch::addOutPort(const vector<MessageBuffer*>& out,

--- 235 unchanged lines hidden ---
79 in[i]->setIncomingLink(port);
80 in[i]->setVnet(i);
81 }
82 }
83}
84
85void
86PerfectSwitch::addOutPort(const vector<MessageBuffer*>& out,

--- 235 unchanged lines hidden ---