提交 5e954f17 authored 作者: James Bergstra's avatar James Bergstra

swapped lambda for inline fn in gof/cc

上级 ea902b07
......@@ -1182,7 +1182,10 @@ class OpWiseCLinker(link.LocalLinker):
if self.fallback_on_perform:
debug('Falling back on perform')
p = node.op.perform
thunk = lambda p = p, i = node_input_storage, o = node_output_storage, n = node: p(n, [x[0] for x in i], o)
# default arguments are stored in the closure of `thunk`
def thunk(p=p, i=node_input_storage, o=node_output_storage,n=node):
return p(n, [x[0] for x in i], o)
#thunk = lambda p = p, i = node_input_storage, o = node_output_storage, n = node: p(n, [x[0] for x in i], o)
thunk.inputs = node_input_storage
thunk.outputs = node_output_storage
thunk.perform = p
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论