NetDest.cc (6372:f1a41ea3bbab) NetDest.cc (6797:7bf0a839c237)
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

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

128 }
129 return counter;
130}
131
132NodeID NetDest::elementAt(MachineID index) {
133 return m_bits[vecIndex(index)].elementAt(bitIndex(index.num));
134}
135
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

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

128 }
129 return counter;
130}
131
132NodeID NetDest::elementAt(MachineID index) {
133 return m_bits[vecIndex(index)].elementAt(bitIndex(index.num));
134}
135
136NodeID NetDest::smallestElement() const
136MachineID NetDest::smallestElement() const
137{
138 assert(count() > 0);
139 for (int i=0; i<m_bits.size(); i++) {
140 for (int j=0; j<m_bits[i].getSize(); j++) {
141 if (m_bits[i].isElement(j)) {
137{
138 assert(count() > 0);
139 for (int i=0; i<m_bits.size(); i++) {
140 for (int j=0; j<m_bits[i].getSize(); j++) {
141 if (m_bits[i].isElement(j)) {
142 return j;
142 MachineID mach = {MachineType_from_base_level(i), j};
143 return mach;
143 }
144 }
145 }
146 ERROR_MSG("No smallest element of an empty set.");
147}
148
149MachineID NetDest::smallestElement(MachineType machine) const
150{

--- 108 unchanged lines hidden ---
144 }
145 }
146 }
147 ERROR_MSG("No smallest element of an empty set.");
148}
149
150MachineID NetDest::smallestElement(MachineType machine) const
151{

--- 108 unchanged lines hidden ---