Pt2Pt.py (11666:10d59d546ea2) | Pt2Pt.py (13731:67cd980cb20f) |
---|---|
1# Copyright (c) 2011 Advanced Micro Devices, Inc. 2# 2011 Massachusetts Institute of Technology 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; --- 49 unchanged lines hidden (view full) --- 58 59 ext_links = [ExtLink(link_id=i, ext_node=n, int_node=routers[i], 60 latency = link_latency) 61 for (i, n) in enumerate(nodes)] 62 network.ext_links = ext_links 63 64 link_count = len(nodes) 65 int_links = [] | 1# Copyright (c) 2011 Advanced Micro Devices, Inc. 2# 2011 Massachusetts Institute of Technology 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; --- 49 unchanged lines hidden (view full) --- 58 59 ext_links = [ExtLink(link_id=i, ext_node=n, int_node=routers[i], 60 latency = link_latency) 61 for (i, n) in enumerate(nodes)] 62 network.ext_links = ext_links 63 64 link_count = len(nodes) 65 int_links = [] |
66 for i in xrange(len(nodes)): 67 for j in xrange(len(nodes)): | 66 for i in range(len(nodes)): 67 for j in range(len(nodes)): |
68 if (i != j): 69 link_count += 1 70 int_links.append(IntLink(link_id=link_count, 71 src_node=routers[i], 72 dst_node=routers[j], 73 latency = link_latency)) 74 75 network.int_links = int_links | 68 if (i != j): 69 link_count += 1 70 int_links.append(IntLink(link_id=link_count, 71 src_node=routers[i], 72 dst_node=routers[j], 73 latency = link_latency)) 74 75 network.int_links = int_links |