Skip to content

Commit

Permalink
Correcting return values for debug version of cudaPreAlloc
Browse files Browse the repository at this point in the history
  • Loading branch information
llaniewski committed Sep 1, 2023
1 parent 91a96d4 commit 785b5eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cross.cu
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ CudaError HandleError( CudaError err,

CudaError cudaPreAlloc(void ** ptr, size_t size) {
debug1("Preallocation of %d b\n", (int) size);
CudaError ret = CudaMalloc(ptr, size);
CudaMalloc(ptr, size); // This macro has error checking already
CudaMemset( *ptr, 0, size );
return ret;
return CudaSuccess;
}

CudaError cudaAllocFinalize() {
Expand Down

0 comments on commit 785b5eb

Please sign in to comment.