We want to optionally be able to have alloc just map to an existing host
pointer via CL_MEM_USE_HOST_PTR. This will be an optimization for OpenCL
kernels running on the CPU or a shared memory architecture like AMD Fusion.
Basically, we should change
static cl_int alloc(size_t bytes, cl_mem* gpuBuffer);
to
static cl_int alloc(size_t bytes, cl_mem* gpuBuffer, void* hostPointer = NULL);
and add logic to set CL_MEM_USE_HOST_PTR when hostPointer is not NULL.
Original issue reported on code.google.com by
rick.web...@gmail.comon 20 Dec 2010 at 9:39