提交 5af8576d authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added _assign_reduce method

上级 bf9e145a
......@@ -836,6 +836,18 @@ class GpuCAReduce(GpuOp):
"""
def _assign_reduce(self, left, right):
"""
left: a C code string identifying an lvalue
right: a C code string identifying an expression
returns C code to reduce left and right, assigning the
result to left."""
self._op_guard()
return left + " += " + right + ";"
def _k_reduce_buf(self, z_pos):
self._op_guard()
# Work with all nvidia driver
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论