gpilab / framework

The GPI framework provides the canvas for graphically assembling algorithms.
Other
20 stars 7 forks source link

Add parallel option to GPI #60

Closed AboudFayad closed 2 years ago

AboudFayad commented 2 years ago

Give the ability to parallelize function by using a built-in decorator

from gpi import parallel

@parallel.function
def func():
    # stuff

results = []
for i in range(10):
    result = func()
    results.append(result)

results = parallel.get(results)