提交 032279b8 authored 作者: James Bergstra's avatar James Bergstra

FIX comment typos

上级 4b8d4973
...@@ -91,7 +91,7 @@ int device_free(void *ptr) ...@@ -91,7 +91,7 @@ int device_free(void *ptr)
cudaError_t err = cudaFree(ptr); cudaError_t err = cudaFree(ptr);
if (cudaSuccess != err) if (cudaSuccess != err)
{ {
// Clear the error flag, cudaMalloc doesn't do it. // Clear the error flag, cudaFree doesn't do it.
// Currently this returns the same thing as err, but if in future // Currently this returns the same thing as err, but if in future
// it returns something else I still don't see why we should ignore // it returns something else I still don't see why we should ignore
// it. All we want to do here is reset the flag. // it. All we want to do here is reset the flag.
...@@ -920,7 +920,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){ ...@@ -920,7 +920,7 @@ CudaNdarray_TakeFrom(CudaNdarray * self, PyObject *args){
} }
cudaError_t err = cudaMemset((void*)err_var, 0, sizeof(int)); cudaError_t err = cudaMemset((void*)err_var, 0, sizeof(int));
if (cudaSuccess != err) { if (cudaSuccess != err) {
// Clear the error flag, cudaMalloc doesn't do it. // Clear the error flag, cudaMemset doesn't do it.
// Currently this returns the same thing as err, but if in future // Currently this returns the same thing as err, but if in future
// it returns something else I still don't see why we should ignore // it returns something else I still don't see why we should ignore
// it. All we want to do here is reset the flag. // it. All we want to do here is reset the flag.
...@@ -2144,7 +2144,7 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value) ...@@ -2144,7 +2144,7 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value)
Py_XDECREF(rval); Py_XDECREF(rval);
if (err) if (err)
{ {
// Clear the error flag, cudaMalloc doesn't do it. // Clear the error flag, cudaMemset doesn't do it.
// Currently this returns the same thing as err, but if in future // Currently this returns the same thing as err, but if in future
// it returns something else I still don't see why we should ignore // it returns something else I still don't see why we should ignore
// it. All we want to do here is reset the flag. // it. All we want to do here is reset the flag.
...@@ -2421,7 +2421,7 @@ GetDeviceMemInfo(PyObject* _unused, PyObject* dummy) ...@@ -2421,7 +2421,7 @@ GetDeviceMemInfo(PyObject* _unused, PyObject* dummy)
cudaError_t err = cudaMemGetInfo(&free, &total); cudaError_t err = cudaMemGetInfo(&free, &total);
if (err != cudaSuccess){ if (err != cudaSuccess){
// Clear the error flag, cudaMalloc doesn't do it. // Clear the error flag, cudaMemGetInfo doesn't do it.
// Currently this returns the same thing as err, but if in future // Currently this returns the same thing as err, but if in future
// it returns something else I still don't see why we should ignore // it returns something else I still don't see why we should ignore
// it. All we want to do here is reset the flag. // it. All we want to do here is reset the flag.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论