提交 99cca869 authored 作者: Frederic's avatar Frederic

Fix indent (not wrong code) and better comment following code review.

上级 ba38ab4b
......@@ -1140,14 +1140,14 @@ class Elemwise(Op):
if not all(var.broadcastable):
contig += """
dtype_%(x)s * %(x)s_ptr = (dtype_%(x)s*) PyArray_DATA(%(x)s);
""" % locals()
""" % locals()
index += """
dtype_%(x)s& %(x)s_i = %(x)s_ptr[i];
""" % locals()
""" % locals()
else:
contig += """
dtype_%(x)s& %(x)s_i = ((dtype_%(x)s*) PyArray_DATA(%(x)s))[0];
""" % locals()
""" % locals()
contig += """
for(int i=0; i<n; i++){
......
......@@ -116,8 +116,9 @@ def make_checks(loop_orders, dtypes, sub):
def make_alloc(loop_orders, dtype, sub, fortran='0'):
"""Generate C code to allocate outputs.
:param fortran: if non-zero, will create a ndarray in fortran
order.
:param fortran: a string included in the generated code. If it
evaludate to non-zero, an ndarray in fortran order will be
created, otherwise it will be c order.
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论