OpenCL buffer allocation and mapping best practice
问题 I am a little confused as to whether my code using OpenCL mapped buffers are correct. I have two examples, one using CL_MEM_USE_HOST_PTR and one using CL_MEM_ALLOC_HOST_PTR. Both work and run on my local machine and OpenCL devices but I am interested in whether this is the correct way of doing the mapping, and whether it should work an all OpenCL devices. I am especially unsure about the USE_HOST_PTR example. I am only interested in the buffer/map specific operations. I am aware I should do