Fix hipMalloc to return error code if allocation fails.

此提交包含在:
Ben Sander committed 2017-04-24 22:30:54 -05:00
1 父節點 1f532b06f6
當前提交 fb7eee01ff
2 file changed
+12 -8

No files matched your search

+1 -1
查看文件
@@ -863,7 +863,7 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t *attributes, const void
*
* If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
*
* @return #hipSuccess
* @return #hipSuccess, #hipErrorMemoryAllocation, #hipErrorInvalidValue (bad context, null *ptr)
*
* @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray, hipHostFree, hipHostMalloc
*/