diff --git a/include/cuspv/cuda_runtime.h b/include/cuspv/cuda_runtime.h index 22832288b..f2dcb6313 100644 --- a/include/cuspv/cuda_runtime.h +++ b/include/cuspv/cuda_runtime.h @@ -774,9 +774,10 @@ template static inline cudaError_t cudaMalloc(T **ptr, size_t size) { return hipMalloc((void **)ptr, size); } -static inline cudaError_t cudaMallocManaged(void **DevPtr, size_t Size, +template +static inline cudaError_t cudaMallocManaged(T **DevPtr, size_t Size, unsigned int Flags = cudaMemAttachGlobal) { - return hipMallocManaged(DevPtr, Size, Flags); + return hipMallocManaged((void**)DevPtr, Size, Flags); } static inline cudaError_t cudaMallocHost(void **Ptr, size_t Size) { return hipHostMalloc(Ptr, Size, 0);