Changeset 126 for pypar/pypar.py
- Timestamp:
- Jul 11, 2005, 6:07:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pypar/pypar.py
r123 r126 47 47 48 48 # Meta data 49 __version__ = '1.9. 1'50 __date__ = '1 5 December 2003'49 __version__ = '1.9.2' 50 __date__ = '11 July 2005' 51 51 __author__ = 'Ole M. Nielsen' 52 52 … … 208 208 209 209 210 def broadcast(buffer, root, vanilla=False ):210 def broadcast(buffer, root, vanilla=False, bypass=False): 211 211 """Wrapper for MPI bcast. 212 212 … … 221 221 Setting vanilla = 1 forces vanilla mode for any type. 222 222 223 """ 223 If bypass is True, all admin and error checks 224 get bypassed to reduce the latency. 225 226 """ 227 228 if bypass: 229 broadcast_array(buffer, root) 230 return 231 224 232 225 233 import types … … 350 358 351 359 352 def reduce(x, op, root, buffer=None, vanilla=0 ):360 def reduce(x, op, root, buffer=None, vanilla=0, bypass=False): 353 361 """Reduce elements in x to buffer (of the same size as x) 354 362 at root applying operation op elementwise. 355 """ 356 357 import types 358 363 364 If bypass is True, all admin and error checks 365 get bypassed to reduce the latency. 366 The buffer must be specified explicitly in this case. 367 """ 368 369 370 371 if bypass: 372 reduce_array(x, buffer, op, root) 373 return 374 375 376 import types 359 377 from mpiext import size 360 378 numproc = size() #Needed to determine buffer size
Note: See TracChangeset
for help on using the changeset viewer.