提交 e0665751 authored 作者: Frederic Bastien's avatar Frederic Bastien

remove compilation warning under ubuntu.

上级 fb61eb6b
...@@ -871,7 +871,7 @@ class ConvOp(Op): ...@@ -871,7 +871,7 @@ class ConvOp(Op):
return ['<numpy/noprefix.h>', '<iostream>', '<sstream>' ] return ['<numpy/noprefix.h>', '<iostream>', '<sstream>' ]
def c_code_cache_version(self): def c_code_cache_version(self):
return (3) return (4)
def c_support_code(self): def c_support_code(self):
return """ return """
...@@ -1536,14 +1536,14 @@ if(%(filtersflipped)s->nd==3){ ...@@ -1536,14 +1536,14 @@ if(%(filtersflipped)s->nd==3){
if(img2d_dim[0] %% %(self_bsize)s!=0){ if(img2d_dim[0] %% %(self_bsize)s!=0){
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"the batch size of the image(%%d) must be a multiple of the bsize value at ConvOp construction(%%d).", "the batch size of the image(%%ld) must be a multiple of the bsize value at ConvOp construction(%%ld).",
img2d_dim[0],%(self_bsize)s); (long)img2d_dim[0],(long)%(self_bsize)s);
%(fail)s; %(fail)s;
} }
if(kerns_dim[0] %% %(self_nkern)s!=0){ if(kerns_dim[0] %% %(self_nkern)s!=0){
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"the number of kernel(%%d) must be a multiple of the nkern value at ConvOp construction(%%d).", "the number of kernel(%%ld) must be a multiple of the nkern value at ConvOp construction(%%ld).",
kerns_dim[0], %(self_nkern)s); (long)kerns_dim[0], (long)%(self_nkern)s);
%(fail)s; %(fail)s;
} }
...@@ -1776,14 +1776,14 @@ if(%(filtersflipped)s->nd==3){ ...@@ -1776,14 +1776,14 @@ if(%(filtersflipped)s->nd==3){
if(img2d_dim[0] != %(self_bsize)s){ if(img2d_dim[0] != %(self_bsize)s){
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"the batch size of the image(%%d) must be a multiple of the bsize value at ConvOp construction(%%d).", "the batch size of the image(%%ld) must be a multiple of the bsize value at ConvOp construction(%%ld).",
img2d_dim[0],%(self_bsize)s); (long)img2d_dim[0],(long)%(self_bsize)s);
%(fail)s; %(fail)s;
} }
if(kerns_dim[0] != %(self_nkern)s){ if(kerns_dim[0] != %(self_nkern)s){
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"the number of kernel(%%d) must be a multiple of the nkern value at ConvOp construction(%%d).", "the number of kernel(%%ld) must be a multiple of the nkern value at ConvOp construction(%%ld).",
kerns_dim[0], %(self_nkern)s); (long)kerns_dim[0], (long)%(self_nkern)s);
%(fail)s; %(fail)s;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论