开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜