提交 1fb44c94 authored 作者: --global's avatar --global

Improve comment in scan python backend

上级 e79aa905
...@@ -1158,9 +1158,12 @@ class Scan(PureOp): ...@@ -1158,9 +1158,12 @@ class Scan(PureOp):
pdx = offset + self.n_shared_outs pdx = offset + self.n_shared_outs
output_storage[pdx].storage[0] = None output_storage[pdx].storage[0] = None
# 4.5. Keep a reference to the variables currently in the # 4.5. Keep a reference to the variables (ndarrays, CudaNdarrays,
# output_storage, and their data, to be able to compare them with # etc) currently in the output_storage to be able to compare them
# the actual outputs of the inner function after its execution # with the actual outputs of the inner function after its
# execution. Also keep pointers to their data to be able to detect
# cases where outputs reused the allocated object but alter the
# memory region they refer to.
for idx in xrange(len(output_storage)): for idx in xrange(len(output_storage)):
var = output_storage[idx].storage[0] var = output_storage[idx].storage[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论