Skip to content

Commit

Permalink
Update portability.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurlungur authored Jun 3, 2022
1 parent fd18459 commit 43ef009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ports-of-call/portability.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
__host__ __device__ inline __attribute__((always_inline))
#define PORTABLE_LAMBDA [=] __host__ __device__
void *PORTABLE_MALLOC(size_t size) {
void *devPtr;
cudaError_t e = cudaMalloc(devPtr, size);
void *devPtr = nullptr;
cudaError_t e = cudaMalloc(&devPtr, size);
return devPtr;
}
void PORTABLE_FREE(void *ptr) { cudaError_t e = cudaFree(ptr); }
Expand Down

0 comments on commit 43ef009

Please sign in to comment.