Create a wrapper macro for malloc
We need a malloc/free wrapper function that maps to
- cuda_malloc when CUDA exists,
- posix_memealign otherwise.
Also needs to have a check that the allocation went smoothly and print an error message if not.
We need a malloc/free wrapper function that maps to
Also needs to have a check that the allocation went smoothly and print an error message if not.