File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,25 @@ def sync(device=None):
105
105
dev = device if device is not None else get_device ()
106
106
safe_call (backend .get ().af_sync (dev ))
107
107
108
- def eval (A ):
108
+ def __eval (* args ):
109
+ for A in args :
110
+ if isinstance (A , tuple ):
111
+ __eval (* A )
112
+ if isinstance (A , list ):
113
+ __eval (* A )
114
+ if isinstance (A , Array ):
115
+ safe_call (backend .get ().af_eval (A .arr ))
116
+
117
+ def eval (* args ):
109
118
"""
110
119
Evaluate the input
111
120
112
121
Parameters
113
122
-----------
114
- A : af.Array
123
+ args : arguments to be evaluated
115
124
"""
116
- safe_call (backend .get ().af_eval (A .arr ))
125
+
126
+ __eval (args )
117
127
118
128
def device_mem_info ():
119
129
"""
@@ -200,3 +210,5 @@ def unlock_device_ptr(a):
200
210
"""
201
211
ptr = ct .c_void_p (0 )
202
212
safe_call (backend .get ().af_unlock_device_ptr (a .arr ))
213
+
214
+ from .array import Array
You can’t perform that action at this time.
0 commit comments