OpenCL, direct access to host memory from GPU kernels
Is there any way to allocate memory on host, that is accessible directly from GPU, without copying?
Like cudaHostGetDevicePointer in CUDA开发者_如何学JAVA.
Yes, use clCreateBuffer with flags containing one of:
- CL_MEM_USE_HOST_PTR
- CL_MEM_ALLOC_HOST_PTR
Which does what you want. For more information visit the man page of clCreateBuffer.
精彩评论