提交 c50a2db1 authored 作者: Frederic's avatar Frederic

don't need to call the c fct when the data is not allocated.

上级 460e9561
...@@ -299,7 +299,7 @@ static int CudaNdarray_alloc_contiguous(CudaNdarray *self, const int nd, const i ...@@ -299,7 +299,7 @@ static int CudaNdarray_alloc_contiguous(CudaNdarray *self, const int nd, const i
size = size * dim[i]; size = size * dim[i];
} }
if (CudaNdarray_is_c_contiguous(self) && (self->data_allocated == size)) if ((self->data_allocated == size) && CudaNdarray_is_c_contiguous(self))
{ {
return 0; return 0;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论