|
@@ -49,7 +49,7 @@ asyncio.run(func1_wait())
|
|
|
def func1_deco():
|
|
|
#time.sleep(1)
|
|
|
print ("Example 3:")
|
|
|
- print ("This is a function wrapped by the decorator function")
|
|
|
+ print ("This is a function no input no output wrapped by the decorator function")
|
|
|
|
|
|
#apply starpu.delayed(func1_deco())
|
|
|
func1_deco()
|
|
@@ -116,4 +116,17 @@ asyncio.run(sub_wait())
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
+#using decorator wrap the function with input
|
|
|
+@starpu.delayed
|
|
|
+def add_deco(a,b,c):
|
|
|
+ #time.sleep(1)
|
|
|
+ print ("Example 8:")
|
|
|
+ print ("This is a function with input wrapped by the decorator function:")
|
|
|
+ print ("The result of function is:", a, "+", b, "+", c, "=", a+b+c)
|
|
|
+
|
|
|
+#apply starpu.delayed(add_deco)
|
|
|
+add_deco(1,2,3)
|
|
|
+
|
|
|
+###############################################################################
|
|
|
+
|
|
|
starpu.task_wait_for_all()
|