fixes
This commit is contained in:
17
examples_ptx/ispc_malloc.h
Normal file
17
examples_ptx/ispc_malloc.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _CUDA_
|
||||
extern void ispc_malloc(void **ptr, const size_t size);
|
||||
extern void ispc_free(void *ptr);
|
||||
#else
|
||||
#include <cstdlib>
|
||||
static inline void ispc_malloc(void **ptr, const size_t size)
|
||||
{
|
||||
*ptr = malloc(size);
|
||||
}
|
||||
static inline void ispc_free(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user