cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

drstrip
Journeyman III

Memory objects and enqueuing

When I create a buffer with CL_MEM_COPY_HOST_PTR, do I have to still enqueue the memory object to do the actual copying? In the MatrixMultiplication example the buffer is created using CL_MEM_USE_HOST_PTR and the object is never enqueued for writing.

 

More confusing is BinarySearch. outputBuffer is created as CL_MEM_WRITE_ONLY, but it is called as an arg to clEnqueueWriteBuffer. Why? The kernel can't read it.

0 Likes
1 Reply
nou
Exemplar

no if you use CL_MEM_COPY_HOST_PTR it will copy data as you create that buffer so there is implicit blocking copy.

0 Likes