提交 81cf9716 authored 作者: Frederic's avatar Frederic

Fix compilation crash on windows.

上级 bd8add03
...@@ -631,21 +631,21 @@ class Subtensor(Op): ...@@ -631,21 +631,21 @@ class Subtensor(Op):
if view_ndim: if view_ndim:
rval = """ rval = """
// Argument of the view // Argument of the view
ssize_t xview_dims[%(view_ndim)s]; npy_intp xview_dims[%(view_ndim)s];
ssize_t xview_strides[%(view_ndim)s]; npy_intp xview_strides[%(view_ndim)s];
"""% locals() """% locals()
else: else:
rval = """ rval = """
// Argument of the view // Argument of the view
ssize_t* xview_dims = NULL; npy_intp* xview_dims = NULL;
ssize_t* xview_strides = NULL; npy_intp* xview_strides = NULL;
""" """
rval += """ rval += """
// One more argument of the view // One more argument of the view
ssize_t xview_offset = 0; npy_intp xview_offset = 0;
// The subtensor is created by iterating over the dimensions // The subtensor is created by iterating over the dimensions
// and updating stride, shape, and data pointers // and updating stride, shape, and data pointers
...@@ -776,7 +776,7 @@ class Subtensor(Op): ...@@ -776,7 +776,7 @@ class Subtensor(Op):
@staticmethod @staticmethod
def helper_c_code_cache_version(): def helper_c_code_cache_version():
return (7,) return (8,)
def c_code(self, node, name, inputs, outputs, sub): # DEBUG def c_code(self, node, name, inputs, outputs, sub): # DEBUG
if not isinstance(node.inputs[0].type, theano.tensor.TensorType): if not isinstance(node.inputs[0].type, theano.tensor.TensorType):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论