added cuda helpers

This commit is contained in:
evghenii
2014-01-04 19:40:26 +01:00
parent 772d240782
commit c7bf732fdf

View 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);
}