Package bpm :: Module parallel
[hide private]
[frames] | no frames]

Module parallel

source code

'parallel.py' is a set of functions that make parallelizing functions much easier. Namely, a 'pmap' function that will use the single-threaded version if parallelization isn't available.
Functions [hide private]
 
pmap(*args, **kargs)
This is a convenient wrapper function that will parallelize a map function if the capability exists. It degrades to a regular map function if not.
source code
 
print_progress(final=False)
This is a nice little progress bar that is reasonably accurate. It isn't perfect but should give a rough idea of how much longer the program needs to run.
source code
 
inc_counter(incby=1)
Each unit this counter is increased by represents a "step" in the program. It is then used to show a progress bar.
source code
 
get_counter()
Simple accessor.
source code
Variables [hide private]
  steps = 10000000
  costs = {'load_genes': 50}
  counter = <Synchronized wrapper for c_int(0)>
  __package__ = 'bpm'