Topology.cc (11793:ef606668d247) Topology.cc (13661:c6e84ef6a309)
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;

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

46// not 'switches', as they will not have a Switch object allocated for
47// them. The first m_nodes SwitchIDs are the links into the network,
48// the second m_nodes set of SwitchIDs represent the the output queues
49// of the network.
50
51Topology::Topology(uint32_t num_routers,
52 const vector<BasicExtLink *> &ext_links,
53 const vector<BasicIntLink *> &int_links)
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;

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

46// not 'switches', as they will not have a Switch object allocated for
47// them. The first m_nodes SwitchIDs are the links into the network,
48// the second m_nodes set of SwitchIDs represent the the output queues
49// of the network.
50
51Topology::Topology(uint32_t num_routers,
52 const vector<BasicExtLink *> &ext_links,
53 const vector<BasicIntLink *> &int_links)
54 : m_nodes(ext_links.size()), m_number_of_switches(num_routers),
54 : m_nodes(MachineType_base_number(MachineType_NUM)),
55 m_number_of_switches(num_routers),
55 m_ext_link_vector(ext_links), m_int_link_vector(int_links)
56{
57 // Total nodes/controllers in network
58 assert(m_nodes > 1);
59
60 // analyze both the internal and external links, create data structures.
61 // The python created external links are bi-directional,
62 // and the python created internal links are uni-directional.

--- 247 unchanged lines hidden ---
56 m_ext_link_vector(ext_links), m_int_link_vector(int_links)
57{
58 // Total nodes/controllers in network
59 assert(m_nodes > 1);
60
61 // analyze both the internal and external links, create data structures.
62 // The python created external links are bi-directional,
63 // and the python created internal links are uni-directional.

--- 247 unchanged lines hidden ---