NetDest.cc (10005:8c2b0dc16ccd) NetDest.cc (10348:c91b23c72d5e)
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;

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

47{
48 assert(m_bits.size() == netDest.getSize());
49 for (int i = 0; i < m_bits.size(); i++) {
50 m_bits[i].addSet(netDest.m_bits[i]);
51 }
52}
53
54void
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;

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

47{
48 assert(m_bits.size() == netDest.getSize());
49 for (int i = 0; i < m_bits.size(); i++) {
50 m_bits[i].addSet(netDest.m_bits[i]);
51 }
52}
53
54void
55NetDest::addRandom()
56{
57 int i = random()%m_bits.size();
58 m_bits[i].addRandom();
59}
60
61void
62NetDest::setNetDest(MachineType machine, const Set& set)
63{
64 // assure that there is only one set of destinations for this machine
65 assert(MachineType_base_level((MachineType)(machine + 1)) -
66 MachineType_base_level(machine) == 1);
67 m_bits[MachineType_base_level(machine)] = set;
68}
69

--- 218 unchanged lines hidden ---
55NetDest::setNetDest(MachineType machine, const Set& set)
56{
57 // assure that there is only one set of destinations for this machine
58 assert(MachineType_base_level((MachineType)(machine + 1)) -
59 MachineType_base_level(machine) == 1);
60 m_bits[MachineType_base_level(machine)] = set;
61}
62

--- 218 unchanged lines hidden ---