提交 9b9f7afb authored 作者: Ian Goodfellow's avatar Ian Goodfellow

change name to be more informative

上级 983863a1
...@@ -4529,7 +4529,8 @@ void fprint_CudaNdarray(FILE * fd, const CudaNdarray *self) ...@@ -4529,7 +4529,8 @@ void fprint_CudaNdarray(FILE * fd, const CudaNdarray *self)
} }
int CudaNdarray_ensure_dims(CudaNdarray ** arr, int nd, const int * dims) int CudaNdarray_ensure_contiguous(CudaNdarray ** arr, int nd,
const int * dims)
{ {
if (*arr == NULL) if (*arr == NULL)
{ {
...@@ -4541,6 +4542,8 @@ int CudaNdarray_ensure_dims(CudaNdarray ** arr, int nd, const int * dims) ...@@ -4541,6 +4542,8 @@ int CudaNdarray_ensure_dims(CudaNdarray ** arr, int nd, const int * dims)
return CudaNdarray_alloc_contiguous(*arr, nd, dims); return CudaNdarray_alloc_contiguous(*arr, nd, dims);
} }
/* /*
Local Variables: Local Variables:
mode:c++ mode:c++
......
...@@ -467,11 +467,13 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args); ...@@ -467,11 +467,13 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args);
static void fprint_CudaNdarray(FILE * fd, const CudaNdarray *self); static void fprint_CudaNdarray(FILE * fd, const CudaNdarray *self);
// Ensures that *arr is a pointer to an ndarray of the specified dimensions // Ensures that *arr is a pointer to a contiguous ndarray of the specified
// dimensions.
// *arr may initially be NULL, a pointer to an ndarray of the wrong size, // *arr may initially be NULL, a pointer to an ndarray of the wrong size,
// or a pointer to an ndarray of the right size. In the last case it will // or a pointer to an ndarray of the right size. In the last case it will
// not change. // not change.
int CudaNdarray_ensure_dims(CudaNdarray ** arr, int nd, const int * dims); int CudaNdarray_ensure_contiguous(CudaNdarray ** arr, int nd,
const int * dims);
#endif #endif
/* /*
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论