Deleted Added
sdiff udiff text old ( 7811:a8fc35183c10 ) new ( 8321:9f34cf472451 )
full compact
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# Copyright (c) 2010 Advanced Micro Devices, Inc.
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;

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

198 def set_parent(self, parent, name):
199 if len(self) == 1:
200 self[0].set_parent(parent, name)
201 else:
202 width = int(math.ceil(math.log(len(self))/math.log(10)))
203 for i,v in enumerate(self):
204 v.set_parent(parent, "%s%0*d" % (name, width, i))
205
206 def has_parent(self):
207 return reduce(lambda x,y: x and y, [v.has_parent() for v in self])
208
209 # return 'cpu0 cpu1' etc. for print_ini()
210 def get_name(self):
211 return ' '.join([v._name for v in self])
212
213 # By iterating through the constituent members of the vector here
214 # we can nicely handle iterating over all a SimObject's children
215 # without having to provide lots of special functions on

--- 1269 unchanged lines hidden ---