Reputation: 973
Is there any way to allocate memory on host, that is accessible directly from GPU, without copying?
Like cudaHostGetDevicePointer in CUDA.
Upvotes: 5
Views: 2823
Reputation: 56417
Yes, use clCreateBuffer with flags containing one of:
Which does what you want. For more information visit the man page of clCreateBuffer.
Upvotes: 8