Topology.cc (10005:8c2b0dc16ccd) | Topology.cc (10078:9400a90ec5d1) |
---|---|
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; --- 75 unchanged lines hidden (view full) --- 84 i != ext_links.end(); ++i) { 85 BasicExtLink *ext_link = (*i); 86 AbstractController *abs_cntrl = ext_link->params()->ext_node; 87 BasicRouter *router = ext_link->params()->int_node; 88 89 // Store the ExtLink pointers for later 90 m_ext_link_vector.push_back(ext_link); 91 | 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; --- 75 unchanged lines hidden (view full) --- 84 i != ext_links.end(); ++i) { 85 BasicExtLink *ext_link = (*i); 86 AbstractController *abs_cntrl = ext_link->params()->ext_node; 87 BasicRouter *router = ext_link->params()->int_node; 88 89 // Store the ExtLink pointers for later 90 m_ext_link_vector.push_back(ext_link); 91 |
92 int machine_base_idx = MachineType_base_number( 93 string_to_MachineType(abs_cntrl->getName())); | 92 int machine_base_idx = MachineType_base_number(abs_cntrl->getType()); |
94 int ext_idx1 = machine_base_idx + abs_cntrl->getVersion(); 95 int ext_idx2 = ext_idx1 + m_nodes; 96 int int_idx = router->params()->router_id + 2*m_nodes; 97 98 // create the internal uni-directional links in both directions 99 // the first direction is marked: In 100 addLink(ext_idx1, int_idx, ext_link, LinkDirection_In); 101 // the first direction is marked: Out --- 234 unchanged lines hidden --- | 93 int ext_idx1 = machine_base_idx + abs_cntrl->getVersion(); 94 int ext_idx2 = ext_idx1 + m_nodes; 95 int int_idx = router->params()->router_id + 2*m_nodes; 96 97 // create the internal uni-directional links in both directions 98 // the first direction is marked: In 99 addLink(ext_idx1, int_idx, ext_link, LinkDirection_In); 100 // the first direction is marked: Out --- 234 unchanged lines hidden --- |