提交 c4fa5db8 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Change NONE_CODE to use sys.maxsize.

This is temporary, as we should remove NONE_CODE ultimately.
上级 8a16a167
...@@ -3422,8 +3422,9 @@ class Subtensor(Op): ...@@ -3422,8 +3422,9 @@ class Subtensor(Op):
fail = sub['fail'] fail = sub['fail']
init_cmds = [] # initialization for subtensor_spec init_cmds = [] # initialization for subtensor_spec
is_slice = [] is_slice = []
#TODO: change that, there can be more than sys.maxint elements #TODO: change that, it might lead to unexpected results,
NONE_CODE = sys.maxint - 1 # see assembla-#767
NONE_CODE = sys.maxsize - 1
pos = [0,1] #annoying version of global variable for init_entry pos = [0,1] #annoying version of global variable for init_entry
def inc_spec_pos(amt): pos[0] += amt def inc_spec_pos(amt): pos[0] += amt
...@@ -3640,7 +3641,7 @@ class Subtensor(Op): ...@@ -3640,7 +3641,7 @@ class Subtensor(Op):
@staticmethod @staticmethod
def helper_c_code_cache_version(): def helper_c_code_cache_version():
return (3,) return (4,)
def c_code(self, node, name, inputs, outputs, sub): #DEBUG def c_code(self, node, name, inputs, outputs, sub): #DEBUG
part0 = self.helper_c_code(node, name, inputs, outputs, sub, part0 = self.helper_c_code(node, name, inputs, outputs, sub,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论