提交 19a7fa85 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix the DeepCopyOp code so that it doesn't use generic names.

上级 1584e29d
...@@ -278,10 +278,10 @@ theano.compile.register_deep_copy_op_c_code(GpuArrayType, """ ...@@ -278,10 +278,10 @@ theano.compile.register_deep_copy_op_c_code(GpuArrayType, """
Py_XDECREF(%(oname)s); Py_XDECREF(%(oname)s);
%(oname)s = new_GpuArray((PyObject *)&GpuArrayType, GpuArray_default_context()); %(oname)s = new_GpuArray((PyObject *)&GpuArrayType, GpuArray_default_context());
if (!%(oname)s) { %(fail)s } if (!%(oname)s) { %(fail)s }
int err; int %(iname)s_err;
err = GpuArray_copy(&%(oname)s->ga, &%(iname)s->ga, GA_ANY_ORDER); %(iname)s_err = GpuArray_copy(&%(oname)s->ga, &%(iname)s->ga, GA_ANY_ORDER);
if (err != GA_NO_ERROR) { if (%(iname)s_err != GA_NO_ERROR) {
PyErr_SetString(PyExc_RuntimeError, "Error during copy"); PyErr_SetString(PyExc_RuntimeError, "Error during copy");
%(fail)s %(fail)s
} }
""", version=(1,)) """, version=(2,))
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论