STEllAR-GROUP / phylanx

An Asynchronous Distributed C++ Array Processing Toolkit
Boost Software License 1.0
75 stars 76 forks source link

Support global keyword #1279

Closed stevenrbrandt closed 4 years ago

stevenrbrandt commented 4 years ago

The global keyword should be used to tag objects that persist between phylanx invocations, e.g.

@Phylanx
def foo1():
     global r1, r2
     r1 = random_d([100,100])
     r2 = random_d([100,100])

@Phylanx
def cannon():
    global r1, r2
    return cannon_product_d(r1, r2)

foo1()
cannon()
ct-clmsn commented 4 years ago

@stevenrbrandt cool idea!