Cluster.py (9100:3caf131d7a95) Cluster.py (9148:a7a72f42919e)
1# Copyright (c) 2012 Advanced Micro Devices, Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

110 link.bandwidth_factor = self.intBW
111 if self.intLatency:
112 link.latency = self.intLatency
113
114 ext_links.append(link)
115
116 return routers, int_links, ext_links
117
1# Copyright (c) 2012 Advanced Micro Devices, Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

110 link.bandwidth_factor = self.intBW
111 if self.intLatency:
112 link.latency = self.intLatency
113
114 ext_links.append(link)
115
116 return routers, int_links, ext_links
117
118 def __len__(self):
119 return len([i for i in self.nodes if type(i) != Cluster]) + \
120 sum([len(i) for i in self.nodes if type(i) == Cluster])