added cuda helpers
This commit is contained in:
16
examples_ptx/nvcc_helpers.cu
Normal file
16
examples_ptx/nvcc_helpers.cu
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "ispc_malloc.h"
|
||||
|
||||
#ifndef _CUDA_
|
||||
#error "Something went wrong..."
|
||||
#endif
|
||||
|
||||
void ispc_malloc(void **ptr, const size_t size)
|
||||
{
|
||||
cudaMallocManaged(ptr, size);
|
||||
}
|
||||
void ispc_free(void *ptr)
|
||||
{
|
||||
cudaFree(ptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user